mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-199f9b66c0a2b2e4/out/
common.rs

1#![doc = "MAVLink common dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#[cfg(feature = "arbitrary")]
5use arbitrary::Arbitrary;
6#[allow(unused_imports)]
7use bitflags::bitflags;
8use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
9#[allow(unused_imports)]
10use num_derive::FromPrimitive;
11#[allow(unused_imports)]
12use num_derive::ToPrimitive;
13#[allow(unused_imports)]
14use num_traits::FromPrimitive;
15#[allow(unused_imports)]
16use num_traits::ToPrimitive;
17#[cfg(feature = "serde")]
18use serde::{Deserialize, Serialize};
19bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
20impl SerialControlFlag {
21    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
22}
23impl Default for SerialControlFlag {
24    fn default() -> Self {
25        Self::DEFAULT
26    }
27}
28bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
29impl HilActuatorControlsFlags {
30    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
31}
32impl Default for HilActuatorControlsFlags {
33    fn default() -> Self {
34        Self::DEFAULT
35    }
36}
37#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
38#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39#[cfg_attr(feature = "serde", serde(tag = "type"))]
40#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41#[repr(u32)]
42pub enum MavOdidOperatorIdType {
43    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
44    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
45}
46impl MavOdidOperatorIdType {
47    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
48}
49impl Default for MavOdidOperatorIdType {
50    fn default() -> Self {
51        Self::DEFAULT
52    }
53}
54#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
55#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
56#[cfg_attr(feature = "serde", serde(tag = "type"))]
57#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
58#[repr(u32)]
59pub enum MavOdidClassEu {
60    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
61    MAV_ODID_CLASS_EU_UNDECLARED = 0,
62    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
63    MAV_ODID_CLASS_EU_CLASS_0 = 1,
64    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
65    MAV_ODID_CLASS_EU_CLASS_1 = 2,
66    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
67    MAV_ODID_CLASS_EU_CLASS_2 = 3,
68    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
69    MAV_ODID_CLASS_EU_CLASS_3 = 4,
70    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
71    MAV_ODID_CLASS_EU_CLASS_4 = 5,
72    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
73    MAV_ODID_CLASS_EU_CLASS_5 = 6,
74    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
75    MAV_ODID_CLASS_EU_CLASS_6 = 7,
76}
77impl MavOdidClassEu {
78    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
79}
80impl Default for MavOdidClassEu {
81    fn default() -> Self {
82        Self::DEFAULT
83    }
84}
85bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
86impl MavModeProperty {
87    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
88}
89impl Default for MavModeProperty {
90    fn default() -> Self {
91        Self::DEFAULT
92    }
93}
94#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
95#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
96#[cfg_attr(feature = "serde", serde(tag = "type"))]
97#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
98#[repr(u32)]
99#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
100pub enum MotorTestOrder {
101    #[doc = "Default autopilot motor test method."]
102    MOTOR_TEST_ORDER_DEFAULT = 0,
103    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
104    MOTOR_TEST_ORDER_SEQUENCE = 1,
105    #[doc = "Motor numbers are specified as the output as labeled on the board."]
106    MOTOR_TEST_ORDER_BOARD = 2,
107}
108impl MotorTestOrder {
109    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
110}
111impl Default for MotorTestOrder {
112    fn default() -> Self {
113        Self::DEFAULT
114    }
115}
116#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
118#[cfg_attr(feature = "serde", serde(tag = "type"))]
119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
120#[repr(u32)]
121#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
122pub enum SetFocusType {
123    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
124    FOCUS_TYPE_STEP = 0,
125    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
126    FOCUS_TYPE_CONTINUOUS = 1,
127    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
128    FOCUS_TYPE_RANGE = 2,
129    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
130    FOCUS_TYPE_METERS = 3,
131    #[doc = "Focus automatically."]
132    FOCUS_TYPE_AUTO = 4,
133    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
134    FOCUS_TYPE_AUTO_SINGLE = 5,
135    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
136    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
137}
138impl SetFocusType {
139    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
140}
141impl Default for SetFocusType {
142    fn default() -> Self {
143        Self::DEFAULT
144    }
145}
146#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
148#[cfg_attr(feature = "serde", serde(tag = "type"))]
149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
150#[repr(u32)]
151#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
152pub enum PrecisionLandMode {
153    #[doc = "Normal (non-precision) landing."]
154    PRECISION_LAND_MODE_DISABLED = 0,
155    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
156    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
157    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
158    PRECISION_LAND_MODE_REQUIRED = 2,
159}
160impl PrecisionLandMode {
161    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
162}
163impl Default for PrecisionLandMode {
164    fn default() -> Self {
165        Self::DEFAULT
166    }
167}
168#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
170#[cfg_attr(feature = "serde", serde(tag = "type"))]
171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
172#[repr(u32)]
173pub enum FenceBreach {
174    #[doc = "No last fence breach"]
175    FENCE_BREACH_NONE = 0,
176    #[doc = "Breached minimum altitude"]
177    FENCE_BREACH_MINALT = 1,
178    #[doc = "Breached maximum altitude"]
179    FENCE_BREACH_MAXALT = 2,
180    #[doc = "Breached fence boundary"]
181    FENCE_BREACH_BOUNDARY = 3,
182}
183impl FenceBreach {
184    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
185}
186impl Default for FenceBreach {
187    fn default() -> Self {
188        Self::DEFAULT
189    }
190}
191#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
192#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
193#[cfg_attr(feature = "serde", serde(tag = "type"))]
194#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
195#[repr(u32)]
196#[doc = "Generalized UAVCAN node health"]
197pub enum UavcanNodeHealth {
198    #[doc = "The node is functioning properly."]
199    UAVCAN_NODE_HEALTH_OK = 0,
200    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
201    UAVCAN_NODE_HEALTH_WARNING = 1,
202    #[doc = "The node has encountered a major failure."]
203    UAVCAN_NODE_HEALTH_ERROR = 2,
204    #[doc = "The node has suffered a fatal malfunction."]
205    UAVCAN_NODE_HEALTH_CRITICAL = 3,
206}
207impl UavcanNodeHealth {
208    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
209}
210impl Default for UavcanNodeHealth {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
216impl MavProtocolCapability {
217    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
218}
219impl Default for MavProtocolCapability {
220    fn default() -> Self {
221        Self::DEFAULT
222    }
223}
224#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
226#[cfg_attr(feature = "serde", serde(tag = "type"))]
227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
228#[repr(u32)]
229#[doc = "Specifies the datatype of a MAVLink parameter."]
230pub enum MavParamType {
231    #[doc = "8-bit unsigned integer"]
232    MAV_PARAM_TYPE_UINT8 = 1,
233    #[doc = "8-bit signed integer"]
234    MAV_PARAM_TYPE_INT8 = 2,
235    #[doc = "16-bit unsigned integer"]
236    MAV_PARAM_TYPE_UINT16 = 3,
237    #[doc = "16-bit signed integer"]
238    MAV_PARAM_TYPE_INT16 = 4,
239    #[doc = "32-bit unsigned integer"]
240    MAV_PARAM_TYPE_UINT32 = 5,
241    #[doc = "32-bit signed integer"]
242    MAV_PARAM_TYPE_INT32 = 6,
243    #[doc = "64-bit unsigned integer"]
244    MAV_PARAM_TYPE_UINT64 = 7,
245    #[doc = "64-bit signed integer"]
246    MAV_PARAM_TYPE_INT64 = 8,
247    #[doc = "32-bit floating-point"]
248    MAV_PARAM_TYPE_REAL32 = 9,
249    #[doc = "64-bit floating-point"]
250    MAV_PARAM_TYPE_REAL64 = 10,
251}
252impl MavParamType {
253    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
254}
255impl Default for MavParamType {
256    fn default() -> Self {
257        Self::DEFAULT
258    }
259}
260bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
261impl MavModeFlag {
262    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
263}
264impl Default for MavModeFlag {
265    fn default() -> Self {
266        Self::DEFAULT
267    }
268}
269#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
271#[cfg_attr(feature = "serde", serde(tag = "type"))]
272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
273#[repr(u32)]
274#[doc = "Enumeration of landed detector states"]
275pub enum MavLandedState {
276    #[doc = "MAV landed state is unknown"]
277    MAV_LANDED_STATE_UNDEFINED = 0,
278    #[doc = "MAV is landed (on ground)"]
279    MAV_LANDED_STATE_ON_GROUND = 1,
280    #[doc = "MAV is in air"]
281    MAV_LANDED_STATE_IN_AIR = 2,
282    #[doc = "MAV currently taking off"]
283    MAV_LANDED_STATE_TAKEOFF = 3,
284    #[doc = "MAV currently landing"]
285    MAV_LANDED_STATE_LANDING = 4,
286}
287impl MavLandedState {
288    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
289}
290impl Default for MavLandedState {
291    fn default() -> Self {
292        Self::DEFAULT
293    }
294}
295#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
297#[cfg_attr(feature = "serde", serde(tag = "type"))]
298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
299#[repr(u32)]
300pub enum MavOdidIdType {
301    #[doc = "No type defined."]
302    MAV_ODID_ID_TYPE_NONE = 0,
303    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
304    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
305    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
306    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
307    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
308    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
309    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
310    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
311}
312impl MavOdidIdType {
313    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
314}
315impl Default for MavOdidIdType {
316    fn default() -> Self {
317        Self::DEFAULT
318    }
319}
320#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
322#[cfg_attr(feature = "serde", serde(tag = "type"))]
323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
324#[repr(u32)]
325pub enum MavOdidUaType {
326    #[doc = "No UA (Unmanned Aircraft) type defined."]
327    MAV_ODID_UA_TYPE_NONE = 0,
328    #[doc = "Aeroplane/Airplane. Fixed wing."]
329    MAV_ODID_UA_TYPE_AEROPLANE = 1,
330    #[doc = "Helicopter or multirotor."]
331    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
332    #[doc = "Gyroplane."]
333    MAV_ODID_UA_TYPE_GYROPLANE = 3,
334    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
335    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
336    #[doc = "Ornithopter."]
337    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
338    #[doc = "Glider."]
339    MAV_ODID_UA_TYPE_GLIDER = 6,
340    #[doc = "Kite."]
341    MAV_ODID_UA_TYPE_KITE = 7,
342    #[doc = "Free Balloon."]
343    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
344    #[doc = "Captive Balloon."]
345    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
346    #[doc = "Airship. E.g. a blimp."]
347    MAV_ODID_UA_TYPE_AIRSHIP = 10,
348    #[doc = "Free Fall/Parachute (unpowered)."]
349    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
350    #[doc = "Rocket."]
351    MAV_ODID_UA_TYPE_ROCKET = 12,
352    #[doc = "Tethered powered aircraft."]
353    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
354    #[doc = "Ground Obstacle."]
355    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
356    #[doc = "Other type of aircraft not listed earlier."]
357    MAV_ODID_UA_TYPE_OTHER = 15,
358}
359impl MavOdidUaType {
360    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
361}
362impl Default for MavOdidUaType {
363    fn default() -> Self {
364        Self::DEFAULT
365    }
366}
367#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
368#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
369#[cfg_attr(feature = "serde", serde(tag = "type"))]
370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
371#[repr(u32)]
372#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
373pub enum MavAutopilot {
374    #[doc = "Generic autopilot, full support for everything"]
375    MAV_AUTOPILOT_GENERIC = 0,
376    #[doc = "Reserved for future use."]
377    MAV_AUTOPILOT_RESERVED = 1,
378    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
379    MAV_AUTOPILOT_SLUGS = 2,
380    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
381    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
382    #[doc = "OpenPilot, <http://openpilot.org>"]
383    MAV_AUTOPILOT_OPENPILOT = 4,
384    #[doc = "Generic autopilot only supporting simple waypoints"]
385    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
386    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
387    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
388    #[doc = "Generic autopilot supporting the full mission command set"]
389    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
390    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
391    MAV_AUTOPILOT_INVALID = 8,
392    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
393    MAV_AUTOPILOT_PPZ = 9,
394    #[doc = "UAV Dev Board"]
395    MAV_AUTOPILOT_UDB = 10,
396    #[doc = "FlexiPilot"]
397    MAV_AUTOPILOT_FP = 11,
398    #[doc = "PX4 Autopilot - <http://px4.io/>"]
399    MAV_AUTOPILOT_PX4 = 12,
400    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
401    MAV_AUTOPILOT_SMACCMPILOT = 13,
402    #[doc = "AutoQuad -- <http://autoquad.org>"]
403    MAV_AUTOPILOT_AUTOQUAD = 14,
404    #[doc = "Armazila -- <http://armazila.com>"]
405    MAV_AUTOPILOT_ARMAZILA = 15,
406    #[doc = "Aerob -- <http://aerob.ru>"]
407    MAV_AUTOPILOT_AEROB = 16,
408    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
409    MAV_AUTOPILOT_ASLUAV = 17,
410    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
411    MAV_AUTOPILOT_SMARTAP = 18,
412    #[doc = "AirRails - <http://uaventure.com>"]
413    MAV_AUTOPILOT_AIRRAILS = 19,
414    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
415    MAV_AUTOPILOT_REFLEX = 20,
416}
417impl MavAutopilot {
418    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
419}
420impl Default for MavAutopilot {
421    fn default() -> Self {
422        Self::DEFAULT
423    }
424}
425#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
427#[cfg_attr(feature = "serde", serde(tag = "type"))]
428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
429#[repr(u32)]
430pub enum MavArmAuthDeniedReason {
431    #[doc = "Not a specific reason"]
432    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
433    #[doc = "Authorizer will send the error as string to GCS"]
434    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
435    #[doc = "At least one waypoint have a invalid value"]
436    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
437    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
438    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
439    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
440    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
441    #[doc = "Weather is not good to fly"]
442    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
443}
444impl MavArmAuthDeniedReason {
445    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
446}
447impl Default for MavArmAuthDeniedReason {
448    fn default() -> Self {
449        Self::DEFAULT
450    }
451}
452bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
453impl StorageUsageFlag {
454    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
455}
456impl Default for StorageUsageFlag {
457    fn default() -> Self {
458        Self::DEFAULT
459    }
460}
461#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
463#[cfg_attr(feature = "serde", serde(tag = "type"))]
464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
465#[repr(u32)]
466#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
467pub enum MavBatteryMode {
468    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
469    MAV_BATTERY_MODE_UNKNOWN = 0,
470    #[doc = "Battery is auto discharging (towards storage level)."]
471    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
472    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
473    MAV_BATTERY_MODE_HOT_SWAP = 2,
474}
475impl MavBatteryMode {
476    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
477}
478impl Default for MavBatteryMode {
479    fn default() -> Self {
480        Self::DEFAULT
481    }
482}
483#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
485#[cfg_attr(feature = "serde", serde(tag = "type"))]
486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
487#[repr(u32)]
488#[doc = "Actions being taken to mitigate/prevent fence breach"]
489pub enum FenceMitigate {
490    #[doc = "Unknown"]
491    FENCE_MITIGATE_UNKNOWN = 0,
492    #[doc = "No actions being taken"]
493    FENCE_MITIGATE_NONE = 1,
494    #[doc = "Velocity limiting active to prevent breach"]
495    FENCE_MITIGATE_VEL_LIMIT = 2,
496}
497impl FenceMitigate {
498    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
499}
500impl Default for FenceMitigate {
501    fn default() -> Self {
502        Self::DEFAULT
503    }
504}
505#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
507#[cfg_attr(feature = "serde", serde(tag = "type"))]
508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
509#[repr(u32)]
510#[doc = "Type of GPS fix"]
511pub enum GpsFixType {
512    #[doc = "No GPS connected"]
513    GPS_FIX_TYPE_NO_GPS = 0,
514    #[doc = "No position information, GPS is connected"]
515    GPS_FIX_TYPE_NO_FIX = 1,
516    #[doc = "2D position"]
517    GPS_FIX_TYPE_2D_FIX = 2,
518    #[doc = "3D position"]
519    GPS_FIX_TYPE_3D_FIX = 3,
520    #[doc = "DGPS/SBAS aided 3D position"]
521    GPS_FIX_TYPE_DGPS = 4,
522    #[doc = "RTK float, 3D position"]
523    GPS_FIX_TYPE_RTK_FLOAT = 5,
524    #[doc = "RTK Fixed, 3D position"]
525    GPS_FIX_TYPE_RTK_FIXED = 6,
526    #[doc = "Static fixed, typically used for base stations"]
527    GPS_FIX_TYPE_STATIC = 7,
528    #[doc = "PPP, 3D position."]
529    GPS_FIX_TYPE_PPP = 8,
530}
531impl GpsFixType {
532    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
533}
534impl Default for GpsFixType {
535    fn default() -> Self {
536        Self::DEFAULT
537    }
538}
539#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
540#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
541#[cfg_attr(feature = "serde", serde(tag = "type"))]
542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
543#[repr(u32)]
544#[doc = "Yaw behaviour during orbit flight."]
545pub enum OrbitYawBehaviour {
546    #[doc = "Vehicle front points to the center (default)."]
547    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
548    #[doc = "Vehicle front holds heading when message received."]
549    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
550    #[doc = "Yaw uncontrolled."]
551    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
552    #[doc = "Vehicle front follows flight path (tangential to circle)."]
553    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
554    #[doc = "Yaw controlled by RC input."]
555    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
556    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
557    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
558}
559impl OrbitYawBehaviour {
560    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
561}
562impl Default for OrbitYawBehaviour {
563    fn default() -> Self {
564        Self::DEFAULT
565    }
566}
567bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
568impl GimbalDeviceCapFlags {
569    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
570}
571impl Default for GimbalDeviceCapFlags {
572    fn default() -> Self {
573        Self::DEFAULT
574    }
575}
576#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
578#[cfg_attr(feature = "serde", serde(tag = "type"))]
579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
580#[repr(u32)]
581#[doc = "Generalized UAVCAN node mode"]
582pub enum UavcanNodeMode {
583    #[doc = "The node is performing its primary functions."]
584    UAVCAN_NODE_MODE_OPERATIONAL = 0,
585    #[doc = "The node is initializing; this mode is entered immediately after startup."]
586    UAVCAN_NODE_MODE_INITIALIZATION = 1,
587    #[doc = "The node is under maintenance."]
588    UAVCAN_NODE_MODE_MAINTENANCE = 2,
589    #[doc = "The node is in the process of updating its software."]
590    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
591    #[doc = "The node is no longer available online."]
592    UAVCAN_NODE_MODE_OFFLINE = 7,
593}
594impl UavcanNodeMode {
595    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
596}
597impl Default for UavcanNodeMode {
598    fn default() -> Self {
599        Self::DEFAULT
600    }
601}
602bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
603impl MavSysStatusSensorExtended {
604    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
605}
606impl Default for MavSysStatusSensorExtended {
607    fn default() -> Self {
608        Self::DEFAULT
609    }
610}
611#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
612#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
613#[cfg_attr(feature = "serde", serde(tag = "type"))]
614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
615#[repr(u32)]
616#[doc = "Type of mission items being requested/sent in mission protocol."]
617pub enum MavMissionType {
618    #[doc = "Items are mission commands for main mission."]
619    MAV_MISSION_TYPE_MISSION = 0,
620    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
621    MAV_MISSION_TYPE_FENCE = 1,
622    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
623    MAV_MISSION_TYPE_RALLY = 2,
624    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
625    MAV_MISSION_TYPE_ALL = 255,
626}
627impl MavMissionType {
628    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
629}
630impl Default for MavMissionType {
631    fn default() -> Self {
632        Self::DEFAULT
633    }
634}
635#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
637#[cfg_attr(feature = "serde", serde(tag = "type"))]
638#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
639#[repr(u32)]
640#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
641pub enum MavType {
642    #[doc = "Generic micro air vehicle"]
643    MAV_TYPE_GENERIC = 0,
644    #[doc = "Fixed wing aircraft."]
645    MAV_TYPE_FIXED_WING = 1,
646    #[doc = "Quadrotor"]
647    MAV_TYPE_QUADROTOR = 2,
648    #[doc = "Coaxial helicopter"]
649    MAV_TYPE_COAXIAL = 3,
650    #[doc = "Normal helicopter with tail rotor."]
651    MAV_TYPE_HELICOPTER = 4,
652    #[doc = "Ground installation"]
653    MAV_TYPE_ANTENNA_TRACKER = 5,
654    #[doc = "Operator control unit / ground control station"]
655    MAV_TYPE_GCS = 6,
656    #[doc = "Airship, controlled"]
657    MAV_TYPE_AIRSHIP = 7,
658    #[doc = "Free balloon, uncontrolled"]
659    MAV_TYPE_FREE_BALLOON = 8,
660    #[doc = "Rocket"]
661    MAV_TYPE_ROCKET = 9,
662    #[doc = "Ground rover"]
663    MAV_TYPE_GROUND_ROVER = 10,
664    #[doc = "Surface vessel, boat, ship"]
665    MAV_TYPE_SURFACE_BOAT = 11,
666    #[doc = "Submarine"]
667    MAV_TYPE_SUBMARINE = 12,
668    #[doc = "Hexarotor"]
669    MAV_TYPE_HEXAROTOR = 13,
670    #[doc = "Octorotor"]
671    MAV_TYPE_OCTOROTOR = 14,
672    #[doc = "Tricopter"]
673    MAV_TYPE_TRICOPTER = 15,
674    #[doc = "Flapping wing"]
675    MAV_TYPE_FLAPPING_WING = 16,
676    #[doc = "Kite"]
677    MAV_TYPE_KITE = 17,
678    #[doc = "Onboard companion controller"]
679    MAV_TYPE_ONBOARD_CONTROLLER = 18,
680    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
681    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
682    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
683    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
684    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
685    MAV_TYPE_VTOL_TILTROTOR = 21,
686    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
687    MAV_TYPE_VTOL_FIXEDROTOR = 22,
688    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
689    MAV_TYPE_VTOL_TAILSITTER = 23,
690    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
691    MAV_TYPE_VTOL_TILTWING = 24,
692    #[doc = "VTOL reserved 5"]
693    MAV_TYPE_VTOL_RESERVED5 = 25,
694    #[doc = "Gimbal"]
695    MAV_TYPE_GIMBAL = 26,
696    #[doc = "ADSB system"]
697    MAV_TYPE_ADSB = 27,
698    #[doc = "Steerable, nonrigid airfoil"]
699    MAV_TYPE_PARAFOIL = 28,
700    #[doc = "Dodecarotor"]
701    MAV_TYPE_DODECAROTOR = 29,
702    #[doc = "Camera"]
703    MAV_TYPE_CAMERA = 30,
704    #[doc = "Charging station"]
705    MAV_TYPE_CHARGING_STATION = 31,
706    #[doc = "FLARM collision avoidance system"]
707    MAV_TYPE_FLARM = 32,
708    #[doc = "Servo"]
709    MAV_TYPE_SERVO = 33,
710    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
711    MAV_TYPE_ODID = 34,
712    #[doc = "Decarotor"]
713    MAV_TYPE_DECAROTOR = 35,
714    #[doc = "Battery"]
715    MAV_TYPE_BATTERY = 36,
716    #[doc = "Parachute"]
717    MAV_TYPE_PARACHUTE = 37,
718    #[doc = "Log"]
719    MAV_TYPE_LOG = 38,
720    #[doc = "OSD"]
721    MAV_TYPE_OSD = 39,
722    #[doc = "IMU"]
723    MAV_TYPE_IMU = 40,
724    #[doc = "GPS"]
725    MAV_TYPE_GPS = 41,
726    #[doc = "Winch"]
727    MAV_TYPE_WINCH = 42,
728    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
729    MAV_TYPE_GENERIC_MULTIROTOR = 43,
730    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
731    MAV_TYPE_ILLUMINATOR = 44,
732    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
733    MAV_TYPE_SPACECRAFT_ORBITER = 45,
734}
735impl MavType {
736    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
737}
738impl Default for MavType {
739    fn default() -> Self {
740        Self::DEFAULT
741    }
742}
743#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
745#[cfg_attr(feature = "serde", serde(tag = "type"))]
746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
747#[repr(u32)]
748#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
749pub enum AutotuneAxis {
750    #[doc = "Autotune roll axis."]
751    AUTOTUNE_AXIS_ROLL = 1,
752    #[doc = "Autotune pitch axis."]
753    AUTOTUNE_AXIS_PITCH = 2,
754    #[doc = "Autotune yaw axis."]
755    AUTOTUNE_AXIS_YAW = 4,
756}
757impl AutotuneAxis {
758    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
759}
760impl Default for AutotuneAxis {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
767#[cfg_attr(feature = "serde", serde(tag = "type"))]
768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
769#[repr(u32)]
770#[doc = "Enumeration of estimator types"]
771pub enum MavEstimatorType {
772    #[doc = "Unknown type of the estimator."]
773    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
774    #[doc = "This is a naive estimator without any real covariance feedback."]
775    MAV_ESTIMATOR_TYPE_NAIVE = 1,
776    #[doc = "Computer vision based estimate. Might be up to scale."]
777    MAV_ESTIMATOR_TYPE_VISION = 2,
778    #[doc = "Visual-inertial estimate."]
779    MAV_ESTIMATOR_TYPE_VIO = 3,
780    #[doc = "Plain GPS estimate."]
781    MAV_ESTIMATOR_TYPE_GPS = 4,
782    #[doc = "Estimator integrating GPS and inertial sensing."]
783    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
784    #[doc = "Estimate from external motion capturing system."]
785    MAV_ESTIMATOR_TYPE_MOCAP = 6,
786    #[doc = "Estimator based on lidar sensor input."]
787    MAV_ESTIMATOR_TYPE_LIDAR = 7,
788    #[doc = "Estimator on autopilot."]
789    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
790}
791impl MavEstimatorType {
792    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
793}
794impl Default for MavEstimatorType {
795    fn default() -> Self {
796        Self::DEFAULT
797    }
798}
799#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
801#[cfg_attr(feature = "serde", serde(tag = "type"))]
802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
803#[repr(u32)]
804#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
805pub enum RcType {
806    #[doc = "Spektrum"]
807    RC_TYPE_SPEKTRUM = 0,
808    #[doc = "CRSF"]
809    RC_TYPE_CRSF = 1,
810}
811impl RcType {
812    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
813}
814impl Default for RcType {
815    fn default() -> Self {
816        Self::DEFAULT
817    }
818}
819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
821#[cfg_attr(feature = "serde", serde(tag = "type"))]
822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
823#[repr(u32)]
824#[doc = "Flags to indicate the status of camera storage."]
825pub enum StorageStatus {
826    #[doc = "Storage is missing (no microSD card loaded for example.)"]
827    STORAGE_STATUS_EMPTY = 0,
828    #[doc = "Storage present but unformatted."]
829    STORAGE_STATUS_UNFORMATTED = 1,
830    #[doc = "Storage present and ready."]
831    STORAGE_STATUS_READY = 2,
832    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
833    STORAGE_STATUS_NOT_SUPPORTED = 3,
834}
835impl StorageStatus {
836    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
837}
838impl Default for StorageStatus {
839    fn default() -> Self {
840        Self::DEFAULT
841    }
842}
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848#[doc = "Aircraft-rated danger from this threat."]
849pub enum MavCollisionThreatLevel {
850    #[doc = "Not a threat"]
851    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
852    #[doc = "Craft is mildly concerned about this threat"]
853    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
854    #[doc = "Craft is panicking, and may take actions to avoid threat"]
855    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
856}
857impl MavCollisionThreatLevel {
858    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
859}
860impl Default for MavCollisionThreatLevel {
861    fn default() -> Self {
862        Self::DEFAULT
863    }
864}
865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
867#[cfg_attr(feature = "serde", serde(tag = "type"))]
868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
869#[repr(u32)]
870pub enum MavOdidHeightRef {
871    #[doc = "The height field is relative to the take-off location."]
872    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
873    #[doc = "The height field is relative to ground."]
874    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
875}
876impl MavOdidHeightRef {
877    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
878}
879impl Default for MavOdidHeightRef {
880    fn default() -> Self {
881        Self::DEFAULT
882    }
883}
884bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
885impl EstimatorStatusFlags {
886    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
887}
888impl Default for EstimatorStatusFlags {
889    fn default() -> Self {
890        Self::DEFAULT
891    }
892}
893#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
895#[cfg_attr(feature = "serde", serde(tag = "type"))]
896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
897#[repr(u32)]
898#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
899pub enum ActuatorConfiguration {
900    #[doc = "Do nothing."]
901    ACTUATOR_CONFIGURATION_NONE = 0,
902    #[doc = "Command the actuator to beep now."]
903    ACTUATOR_CONFIGURATION_BEEP = 1,
904    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
905    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
906    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
907    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
908    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
909    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
910    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
911    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
912}
913impl ActuatorConfiguration {
914    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
915}
916impl Default for ActuatorConfiguration {
917    fn default() -> Self {
918        Self::DEFAULT
919    }
920}
921#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
923#[cfg_attr(feature = "serde", serde(tag = "type"))]
924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
925#[repr(u32)]
926#[doc = "Enumeration of VTOL states"]
927pub enum MavVtolState {
928    #[doc = "MAV is not configured as VTOL"]
929    MAV_VTOL_STATE_UNDEFINED = 0,
930    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
931    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
932    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
933    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
934    #[doc = "VTOL is in multicopter state"]
935    MAV_VTOL_STATE_MC = 3,
936    #[doc = "VTOL is in fixed-wing state"]
937    MAV_VTOL_STATE_FW = 4,
938}
939impl MavVtolState {
940    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
941}
942impl Default for MavVtolState {
943    fn default() -> Self {
944        Self::DEFAULT
945    }
946}
947#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
949#[cfg_attr(feature = "serde", serde(tag = "type"))]
950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
951#[repr(u32)]
952#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
953pub enum MavRoi {
954    #[doc = "No region of interest."]
955    MAV_ROI_NONE = 0,
956    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
957    MAV_ROI_WPNEXT = 1,
958    #[doc = "Point toward given waypoint."]
959    MAV_ROI_WPINDEX = 2,
960    #[doc = "Point toward fixed location."]
961    MAV_ROI_LOCATION = 3,
962    #[doc = "Point toward of given id."]
963    MAV_ROI_TARGET = 4,
964}
965impl MavRoi {
966    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
967}
968impl Default for MavRoi {
969    fn default() -> Self {
970        Self::DEFAULT
971    }
972}
973#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
975#[cfg_attr(feature = "serde", serde(tag = "type"))]
976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
977#[repr(u32)]
978#[doc = "Gripper actions."]
979pub enum GripperActions {
980    #[doc = "Gripper release cargo."]
981    GRIPPER_ACTION_RELEASE = 0,
982    #[doc = "Gripper grab onto cargo."]
983    GRIPPER_ACTION_GRAB = 1,
984}
985impl GripperActions {
986    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
987}
988impl Default for GripperActions {
989    fn default() -> Self {
990        Self::DEFAULT
991    }
992}
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
999pub enum MavFuelType {
1000    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
1001    MAV_FUEL_TYPE_UNKNOWN = 0,
1002    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
1003    MAV_FUEL_TYPE_LIQUID = 1,
1004    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
1005    MAV_FUEL_TYPE_GAS = 2,
1006}
1007impl MavFuelType {
1008    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
1009}
1010impl Default for MavFuelType {
1011    fn default() -> Self {
1012        Self::DEFAULT
1013    }
1014}
1015#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1017#[cfg_attr(feature = "serde", serde(tag = "type"))]
1018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1019#[repr(u32)]
1020#[doc = "Enumeration of distance sensor types"]
1021pub enum MavDistanceSensor {
1022    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
1023    MAV_DISTANCE_SENSOR_LASER = 0,
1024    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
1025    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
1026    #[doc = "Infrared rangefinder, e.g. Sharp units"]
1027    MAV_DISTANCE_SENSOR_INFRARED = 2,
1028    #[doc = "Radar type, e.g. uLanding units"]
1029    MAV_DISTANCE_SENSOR_RADAR = 3,
1030    #[doc = "Broken or unknown type, e.g. analog units"]
1031    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
1032}
1033impl MavDistanceSensor {
1034    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
1035}
1036impl Default for MavDistanceSensor {
1037    fn default() -> Self {
1038        Self::DEFAULT
1039    }
1040}
1041bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
1042impl MavWinchStatusFlag {
1043    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
1044}
1045impl Default for MavWinchStatusFlag {
1046    fn default() -> Self {
1047        Self::DEFAULT
1048    }
1049}
1050#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1052#[cfg_attr(feature = "serde", serde(tag = "type"))]
1053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1054#[repr(u32)]
1055#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
1056pub enum MavDataStream {
1057    #[doc = "Enable all data streams"]
1058    MAV_DATA_STREAM_ALL = 0,
1059    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
1060    MAV_DATA_STREAM_RAW_SENSORS = 1,
1061    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
1062    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
1063    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
1064    MAV_DATA_STREAM_RC_CHANNELS = 3,
1065    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
1066    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
1067    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
1068    MAV_DATA_STREAM_POSITION = 6,
1069    #[doc = "Dependent on the autopilot"]
1070    MAV_DATA_STREAM_EXTRA1 = 10,
1071    #[doc = "Dependent on the autopilot"]
1072    MAV_DATA_STREAM_EXTRA2 = 11,
1073    #[doc = "Dependent on the autopilot"]
1074    MAV_DATA_STREAM_EXTRA3 = 12,
1075}
1076impl MavDataStream {
1077    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
1078}
1079impl Default for MavDataStream {
1080    fn default() -> Self {
1081        Self::DEFAULT
1082    }
1083}
1084#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1086#[cfg_attr(feature = "serde", serde(tag = "type"))]
1087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1088#[repr(u32)]
1089pub enum MavOdidClassificationType {
1090    #[doc = "The classification type for the UA is undeclared."]
1091    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
1092    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
1093    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
1094}
1095impl MavOdidClassificationType {
1096    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
1097}
1098impl Default for MavOdidClassificationType {
1099    fn default() -> Self {
1100        Self::DEFAULT
1101    }
1102}
1103bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
1104impl MavPowerStatus {
1105    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
1106}
1107impl Default for MavPowerStatus {
1108    fn default() -> Self {
1109        Self::DEFAULT
1110    }
1111}
1112#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1114#[cfg_attr(feature = "serde", serde(tag = "type"))]
1115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1116#[repr(u32)]
1117pub enum MavOdidAuthType {
1118    #[doc = "No authentication type is specified."]
1119    MAV_ODID_AUTH_TYPE_NONE = 0,
1120    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
1121    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
1122    #[doc = "Signature for the Operator ID."]
1123    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
1124    #[doc = "Signature for the entire message set."]
1125    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
1126    #[doc = "Authentication is provided by Network Remote ID."]
1127    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
1128    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
1129    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
1130}
1131impl MavOdidAuthType {
1132    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
1133}
1134impl Default for MavOdidAuthType {
1135    fn default() -> Self {
1136        Self::DEFAULT
1137    }
1138}
1139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1141#[cfg_attr(feature = "serde", serde(tag = "type"))]
1142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1143#[repr(u32)]
1144pub enum MavOdidTimeAcc {
1145    #[doc = "The timestamp accuracy is unknown."]
1146    MAV_ODID_TIME_ACC_UNKNOWN = 0,
1147    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
1148    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
1149    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
1150    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
1151    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
1152    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
1153    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
1154    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
1155    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
1156    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
1157    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
1158    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
1159    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
1160    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
1161    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
1162    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
1163    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
1164    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
1165    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
1166    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
1167    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
1168    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
1169    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
1170    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
1171    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
1172    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
1173    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
1174    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
1175    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
1176    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
1177}
1178impl MavOdidTimeAcc {
1179    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
1180}
1181impl Default for MavOdidTimeAcc {
1182    fn default() -> Self {
1183        Self::DEFAULT
1184    }
1185}
1186bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
1187impl CameraTrackingTargetData {
1188    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
1189}
1190impl Default for CameraTrackingTargetData {
1191    fn default() -> Self {
1192        Self::DEFAULT
1193    }
1194}
1195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1197#[cfg_attr(feature = "serde", serde(tag = "type"))]
1198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1199#[repr(u32)]
1200#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
1201pub enum MavFrame {
1202    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
1203    MAV_FRAME_GLOBAL = 0,
1204    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
1205    MAV_FRAME_LOCAL_NED = 1,
1206    #[doc = "NOT a coordinate frame, indicates a mission command."]
1207    MAV_FRAME_MISSION = 2,
1208    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
1209    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
1210    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
1211    MAV_FRAME_LOCAL_ENU = 4,
1212    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
1213    MAV_FRAME_GLOBAL_INT = 5,
1214    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
1215    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
1216    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
1217    MAV_FRAME_LOCAL_OFFSET_NED = 7,
1218    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
1219    MAV_FRAME_BODY_NED = 8,
1220    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
1221    MAV_FRAME_BODY_OFFSET_NED = 9,
1222    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
1223    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
1224    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
1225    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
1226    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
1227    MAV_FRAME_BODY_FRD = 12,
1228    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
1229    MAV_FRAME_RESERVED_13 = 13,
1230    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
1231    MAV_FRAME_RESERVED_14 = 14,
1232    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
1233    MAV_FRAME_RESERVED_15 = 15,
1234    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
1235    MAV_FRAME_RESERVED_16 = 16,
1236    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
1237    MAV_FRAME_RESERVED_17 = 17,
1238    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
1239    MAV_FRAME_RESERVED_18 = 18,
1240    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
1241    MAV_FRAME_RESERVED_19 = 19,
1242    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
1243    MAV_FRAME_LOCAL_FRD = 20,
1244    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
1245    MAV_FRAME_LOCAL_FLU = 21,
1246}
1247impl MavFrame {
1248    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
1249}
1250impl Default for MavFrame {
1251    fn default() -> Self {
1252        Self::DEFAULT
1253    }
1254}
1255#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1257#[cfg_attr(feature = "serde", serde(tag = "type"))]
1258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1259#[repr(u32)]
1260#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
1261pub enum MavStandardMode {
1262    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
1263    MAV_STANDARD_MODE_NON_STANDARD = 0,
1264    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
1265    MAV_STANDARD_MODE_POSITION_HOLD = 1,
1266    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
1267    MAV_STANDARD_MODE_ORBIT = 2,
1268    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
1269    MAV_STANDARD_MODE_CRUISE = 3,
1270    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
1271    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
1272    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
1273    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
1274    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
1275    MAV_STANDARD_MODE_MISSION = 6,
1276    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
1277    MAV_STANDARD_MODE_LAND = 7,
1278    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
1279    MAV_STANDARD_MODE_TAKEOFF = 8,
1280}
1281impl MavStandardMode {
1282    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
1283}
1284impl Default for MavStandardMode {
1285    fn default() -> Self {
1286        Self::DEFAULT
1287    }
1288}
1289#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1291#[cfg_attr(feature = "serde", serde(tag = "type"))]
1292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1293#[repr(u32)]
1294#[doc = "Possible safety switch states."]
1295pub enum SafetySwitchState {
1296    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
1297    SAFETY_SWITCH_STATE_SAFE = 0,
1298    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
1299    SAFETY_SWITCH_STATE_DANGEROUS = 1,
1300}
1301impl SafetySwitchState {
1302    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
1303}
1304impl Default for SafetySwitchState {
1305    fn default() -> Self {
1306        Self::DEFAULT
1307    }
1308}
1309#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1311#[cfg_attr(feature = "serde", serde(tag = "type"))]
1312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1313#[repr(u32)]
1314#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
1315pub enum RtkBaselineCoordinateSystem {
1316    #[doc = "Earth-centered, Earth-fixed"]
1317    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
1318    #[doc = "RTK basestation centered, north, east, down"]
1319    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
1320}
1321impl RtkBaselineCoordinateSystem {
1322    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
1323}
1324impl Default for RtkBaselineCoordinateSystem {
1325    fn default() -> Self {
1326        Self::DEFAULT
1327    }
1328}
1329#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1331#[cfg_attr(feature = "serde", serde(tag = "type"))]
1332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1333#[repr(u32)]
1334#[doc = "These flags encode the cellular network status"]
1335pub enum CellularStatusFlag {
1336    #[doc = "State unknown or not reportable."]
1337    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
1338    #[doc = "Modem is unusable"]
1339    CELLULAR_STATUS_FLAG_FAILED = 1,
1340    #[doc = "Modem is being initialized"]
1341    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
1342    #[doc = "Modem is locked"]
1343    CELLULAR_STATUS_FLAG_LOCKED = 3,
1344    #[doc = "Modem is not enabled and is powered down"]
1345    CELLULAR_STATUS_FLAG_DISABLED = 4,
1346    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
1347    CELLULAR_STATUS_FLAG_DISABLING = 5,
1348    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
1349    CELLULAR_STATUS_FLAG_ENABLING = 6,
1350    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
1351    CELLULAR_STATUS_FLAG_ENABLED = 7,
1352    #[doc = "Modem is searching for a network provider to register"]
1353    CELLULAR_STATUS_FLAG_SEARCHING = 8,
1354    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
1355    CELLULAR_STATUS_FLAG_REGISTERED = 9,
1356    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
1357    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
1358    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
1359    CELLULAR_STATUS_FLAG_CONNECTING = 11,
1360    #[doc = "One or more packet data bearers is active and connected"]
1361    CELLULAR_STATUS_FLAG_CONNECTED = 12,
1362}
1363impl CellularStatusFlag {
1364    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
1365}
1366impl Default for CellularStatusFlag {
1367    fn default() -> Self {
1368        Self::DEFAULT
1369    }
1370}
1371#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1373#[cfg_attr(feature = "serde", serde(tag = "type"))]
1374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1375#[repr(u32)]
1376pub enum MavOdidDescType {
1377    #[doc = "Optional free-form text description of the purpose of the flight."]
1378    MAV_ODID_DESC_TYPE_TEXT = 0,
1379    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
1380    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
1381    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
1382    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
1383}
1384impl MavOdidDescType {
1385    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
1386}
1387impl Default for MavOdidDescType {
1388    fn default() -> Self {
1389        Self::DEFAULT
1390    }
1391}
1392#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1394#[cfg_attr(feature = "serde", serde(tag = "type"))]
1395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1396#[repr(u32)]
1397#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
1398pub enum WifiConfigApResponse {
1399    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
1400    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
1401    #[doc = "Changes accepted."]
1402    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
1403    #[doc = "Changes rejected."]
1404    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
1405    #[doc = "Invalid Mode."]
1406    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
1407    #[doc = "Invalid SSID."]
1408    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
1409    #[doc = "Invalid Password."]
1410    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
1411}
1412impl WifiConfigApResponse {
1413    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
1414}
1415impl Default for WifiConfigApResponse {
1416    fn default() -> Self {
1417        Self::DEFAULT
1418    }
1419}
1420bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
1421impl AdsbFlags {
1422    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
1423}
1424impl Default for AdsbFlags {
1425    fn default() -> Self {
1426        Self::DEFAULT
1427    }
1428}
1429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1431#[cfg_attr(feature = "serde", serde(tag = "type"))]
1432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1433#[repr(u32)]
1434#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
1435pub enum AisNavStatus {
1436    #[doc = "Under way using engine."]
1437    UNDER_WAY = 0,
1438    AIS_NAV_ANCHORED = 1,
1439    AIS_NAV_UN_COMMANDED = 2,
1440    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
1441    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
1442    AIS_NAV_MOORED = 5,
1443    AIS_NAV_AGROUND = 6,
1444    AIS_NAV_FISHING = 7,
1445    AIS_NAV_SAILING = 8,
1446    AIS_NAV_RESERVED_HSC = 9,
1447    AIS_NAV_RESERVED_WIG = 10,
1448    AIS_NAV_RESERVED_1 = 11,
1449    AIS_NAV_RESERVED_2 = 12,
1450    AIS_NAV_RESERVED_3 = 13,
1451    #[doc = "Search And Rescue Transponder."]
1452    AIS_NAV_AIS_SART = 14,
1453    #[doc = "Not available (default)."]
1454    AIS_NAV_UNKNOWN = 15,
1455}
1456impl AisNavStatus {
1457    pub const DEFAULT: Self = Self::UNDER_WAY;
1458}
1459impl Default for AisNavStatus {
1460    fn default() -> Self {
1461        Self::DEFAULT
1462    }
1463}
1464#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1465#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1466#[cfg_attr(feature = "serde", serde(tag = "type"))]
1467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1468#[repr(u32)]
1469#[doc = "Cellular network radio type"]
1470pub enum CellularNetworkRadioType {
1471    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
1472    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
1473    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
1474    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
1475    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
1476}
1477impl CellularNetworkRadioType {
1478    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
1479}
1480impl Default for CellularNetworkRadioType {
1481    fn default() -> Self {
1482        Self::DEFAULT
1483    }
1484}
1485#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1487#[cfg_attr(feature = "serde", serde(tag = "type"))]
1488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1489#[repr(u32)]
1490#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
1491pub enum MavGoto {
1492    #[doc = "Hold at the current position."]
1493    MAV_GOTO_DO_HOLD = 0,
1494    #[doc = "Continue with the next item in mission execution."]
1495    MAV_GOTO_DO_CONTINUE = 1,
1496    #[doc = "Hold at the current position of the system"]
1497    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
1498    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
1499    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
1500}
1501impl MavGoto {
1502    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
1503}
1504impl Default for MavGoto {
1505    fn default() -> Self {
1506        Self::DEFAULT
1507    }
1508}
1509#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1511#[cfg_attr(feature = "serde", serde(tag = "type"))]
1512#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1513#[repr(u32)]
1514#[doc = "Reason for an event error response."]
1515pub enum MavEventErrorReason {
1516    #[doc = "The requested event is not available (anymore)."]
1517    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
1518}
1519impl MavEventErrorReason {
1520    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
1521}
1522impl Default for MavEventErrorReason {
1523    fn default() -> Self {
1524        Self::DEFAULT
1525    }
1526}
1527#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1529#[cfg_attr(feature = "serde", serde(tag = "type"))]
1530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1531#[repr(u32)]
1532#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
1533pub enum RebootShutdownConditions {
1534    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
1535    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
1536    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
1537    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
1538}
1539impl RebootShutdownConditions {
1540    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
1541}
1542impl Default for RebootShutdownConditions {
1543    fn default() -> Self {
1544        Self::DEFAULT
1545    }
1546}
1547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1549#[cfg_attr(feature = "serde", serde(tag = "type"))]
1550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1551#[repr(u32)]
1552#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
1553pub enum CompMetadataType {
1554    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
1555    COMP_METADATA_TYPE_GENERAL = 0,
1556    #[doc = "Parameter meta data."]
1557    COMP_METADATA_TYPE_PARAMETER = 1,
1558    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
1559    COMP_METADATA_TYPE_COMMANDS = 2,
1560    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
1561    COMP_METADATA_TYPE_PERIPHERALS = 3,
1562    #[doc = "Meta data for the events interface."]
1563    COMP_METADATA_TYPE_EVENTS = 4,
1564    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
1565    COMP_METADATA_TYPE_ACTUATORS = 5,
1566}
1567impl CompMetadataType {
1568    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
1569}
1570impl Default for CompMetadataType {
1571    fn default() -> Self {
1572        Self::DEFAULT
1573    }
1574}
1575#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1576#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1577#[cfg_attr(feature = "serde", serde(tag = "type"))]
1578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1579#[repr(u32)]
1580#[doc = "Enumeration for battery charge states."]
1581pub enum MavBatteryChargeState {
1582    #[doc = "Low battery state is not provided"]
1583    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1584    #[doc = "Battery is not in low state. Normal operation."]
1585    MAV_BATTERY_CHARGE_STATE_OK = 1,
1586    #[doc = "Battery state is low, warn and monitor close."]
1587    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1588    #[doc = "Battery state is critical, return or abort immediately."]
1589    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1590    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1591    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1592    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1593    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1594    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1595    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1596    #[doc = "Battery is charging."]
1597    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1598}
1599impl MavBatteryChargeState {
1600    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1601}
1602impl Default for MavBatteryChargeState {
1603    fn default() -> Self {
1604        Self::DEFAULT
1605    }
1606}
1607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1609#[cfg_attr(feature = "serde", serde(tag = "type"))]
1610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1611#[repr(u32)]
1612#[doc = "Winch actions."]
1613pub enum WinchActions {
1614    #[doc = "Allow motor to freewheel."]
1615    WINCH_RELAXED = 0,
1616    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
1617    WINCH_RELATIVE_LENGTH_CONTROL = 1,
1618    #[doc = "Wind or unwind line at specified rate."]
1619    WINCH_RATE_CONTROL = 2,
1620    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
1621    WINCH_LOCK = 3,
1622    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
1623    WINCH_DELIVER = 4,
1624    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
1625    WINCH_HOLD = 5,
1626    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
1627    WINCH_RETRACT = 6,
1628    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
1629    WINCH_LOAD_LINE = 7,
1630    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
1631    WINCH_ABANDON_LINE = 8,
1632    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
1633    WINCH_LOAD_PAYLOAD = 9,
1634}
1635impl WinchActions {
1636    pub const DEFAULT: Self = Self::WINCH_RELAXED;
1637}
1638impl Default for WinchActions {
1639    fn default() -> Self {
1640        Self::DEFAULT
1641    }
1642}
1643#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1645#[cfg_attr(feature = "serde", serde(tag = "type"))]
1646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1647#[repr(u32)]
1648#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
1649pub enum CellularNetworkFailedReason {
1650    #[doc = "No error"]
1651    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
1652    #[doc = "Error state is unknown"]
1653    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
1654    #[doc = "SIM is required for the modem but missing"]
1655    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
1656    #[doc = "SIM is available, but not usable for connection"]
1657    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
1658}
1659impl CellularNetworkFailedReason {
1660    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
1661}
1662impl Default for CellularNetworkFailedReason {
1663    fn default() -> Self {
1664        Self::DEFAULT
1665    }
1666}
1667#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1669#[cfg_attr(feature = "serde", serde(tag = "type"))]
1670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1671#[repr(u32)]
1672#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
1673pub enum SpeedType {
1674    #[doc = "Airspeed"]
1675    SPEED_TYPE_AIRSPEED = 0,
1676    #[doc = "Groundspeed"]
1677    SPEED_TYPE_GROUNDSPEED = 1,
1678    #[doc = "Climb speed"]
1679    SPEED_TYPE_CLIMB_SPEED = 2,
1680    #[doc = "Descent speed"]
1681    SPEED_TYPE_DESCENT_SPEED = 3,
1682}
1683impl SpeedType {
1684    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
1685}
1686impl Default for SpeedType {
1687    fn default() -> Self {
1688        Self::DEFAULT
1689    }
1690}
1691#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1693#[cfg_attr(feature = "serde", serde(tag = "type"))]
1694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1695#[repr(u32)]
1696pub enum MavOdidStatus {
1697    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
1698    MAV_ODID_STATUS_UNDECLARED = 0,
1699    #[doc = "The UA is on the ground."]
1700    MAV_ODID_STATUS_GROUND = 1,
1701    #[doc = "The UA is in the air."]
1702    MAV_ODID_STATUS_AIRBORNE = 2,
1703    #[doc = "The UA is having an emergency."]
1704    MAV_ODID_STATUS_EMERGENCY = 3,
1705    #[doc = "The remote ID system is failing or unreliable in some way."]
1706    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
1707}
1708impl MavOdidStatus {
1709    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
1710}
1711impl Default for MavOdidStatus {
1712    fn default() -> Self {
1713        Self::DEFAULT
1714    }
1715}
1716#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1718#[cfg_attr(feature = "serde", serde(tag = "type"))]
1719#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1720#[repr(u32)]
1721#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
1722pub enum FirmwareVersionType {
1723    #[doc = "development release"]
1724    FIRMWARE_VERSION_TYPE_DEV = 0,
1725    #[doc = "alpha release"]
1726    FIRMWARE_VERSION_TYPE_ALPHA = 64,
1727    #[doc = "beta release"]
1728    FIRMWARE_VERSION_TYPE_BETA = 128,
1729    #[doc = "release candidate"]
1730    FIRMWARE_VERSION_TYPE_RC = 192,
1731    #[doc = "official stable release"]
1732    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
1733}
1734impl FirmwareVersionType {
1735    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
1736}
1737impl Default for FirmwareVersionType {
1738    fn default() -> Self {
1739        Self::DEFAULT
1740    }
1741}
1742#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1744#[cfg_attr(feature = "serde", serde(tag = "type"))]
1745#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1746#[repr(u32)]
1747pub enum MagCalStatus {
1748    MAG_CAL_NOT_STARTED = 0,
1749    MAG_CAL_WAITING_TO_START = 1,
1750    MAG_CAL_RUNNING_STEP_ONE = 2,
1751    MAG_CAL_RUNNING_STEP_TWO = 3,
1752    MAG_CAL_SUCCESS = 4,
1753    MAG_CAL_FAILED = 5,
1754    MAG_CAL_BAD_ORIENTATION = 6,
1755    MAG_CAL_BAD_RADIUS = 7,
1756}
1757impl MagCalStatus {
1758    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1759}
1760impl Default for MagCalStatus {
1761    fn default() -> Self {
1762        Self::DEFAULT
1763    }
1764}
1765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1767#[cfg_attr(feature = "serde", serde(tag = "type"))]
1768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1769#[repr(u32)]
1770pub enum CanFilterOp {
1771    CAN_FILTER_REPLACE = 0,
1772    CAN_FILTER_ADD = 1,
1773    CAN_FILTER_REMOVE = 2,
1774}
1775impl CanFilterOp {
1776    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
1777}
1778impl Default for CanFilterOp {
1779    fn default() -> Self {
1780        Self::DEFAULT
1781    }
1782}
1783#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1785#[cfg_attr(feature = "serde", serde(tag = "type"))]
1786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1787#[repr(u32)]
1788#[doc = "Possible responses from a CELLULAR_CONFIG message."]
1789pub enum CellularConfigResponse {
1790    #[doc = "Changes accepted."]
1791    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
1792    #[doc = "Invalid APN."]
1793    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
1794    #[doc = "Invalid PIN."]
1795    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
1796    #[doc = "Changes rejected."]
1797    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
1798    #[doc = "PUK is required to unblock SIM card."]
1799    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
1800}
1801impl CellularConfigResponse {
1802    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
1803}
1804impl Default for CellularConfigResponse {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1810impl HighresImuUpdatedFlags {
1811    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1812}
1813impl Default for HighresImuUpdatedFlags {
1814    fn default() -> Self {
1815        Self::DEFAULT
1816    }
1817}
1818#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1820#[cfg_attr(feature = "serde", serde(tag = "type"))]
1821#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1822#[repr(u32)]
1823#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
1824pub enum MavEventCurrentSequenceFlags {
1825    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
1826    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
1827}
1828impl MavEventCurrentSequenceFlags {
1829    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
1830}
1831impl Default for MavEventCurrentSequenceFlags {
1832    fn default() -> Self {
1833        Self::DEFAULT
1834    }
1835}
1836#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1837#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1838#[cfg_attr(feature = "serde", serde(tag = "type"))]
1839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1840#[repr(u32)]
1841#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
1842pub enum PreflightStorageParameterAction {
1843    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
1844    PARAM_READ_PERSISTENT = 0,
1845    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
1846    PARAM_WRITE_PERSISTENT = 1,
1847    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
1848    PARAM_RESET_CONFIG_DEFAULT = 2,
1849    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
1850    PARAM_RESET_SENSOR_DEFAULT = 3,
1851    #[doc = "Reset all parameters, including operation counters, to default values"]
1852    PARAM_RESET_ALL_DEFAULT = 4,
1853}
1854impl PreflightStorageParameterAction {
1855    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
1856}
1857impl Default for PreflightStorageParameterAction {
1858    fn default() -> Self {
1859        Self::DEFAULT
1860    }
1861}
1862bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1863impl GpsInputIgnoreFlags {
1864    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1865}
1866impl Default for GpsInputIgnoreFlags {
1867    fn default() -> Self {
1868        Self::DEFAULT
1869    }
1870}
1871bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
1872impl EscFailureFlags {
1873    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
1874}
1875impl Default for EscFailureFlags {
1876    fn default() -> Self {
1877        Self::DEFAULT
1878    }
1879}
1880bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
1881impl AttitudeTargetTypemask {
1882    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
1883}
1884impl Default for AttitudeTargetTypemask {
1885    fn default() -> Self {
1886        Self::DEFAULT
1887    }
1888}
1889bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
1890impl UtmDataAvailFlags {
1891    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
1892}
1893impl Default for UtmDataAvailFlags {
1894    fn default() -> Self {
1895        Self::DEFAULT
1896    }
1897}
1898bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
1899impl MavSysStatusSensor {
1900    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
1901}
1902impl Default for MavSysStatusSensor {
1903    fn default() -> Self {
1904        Self::DEFAULT
1905    }
1906}
1907#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1909#[cfg_attr(feature = "serde", serde(tag = "type"))]
1910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1911#[repr(u32)]
1912#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1913pub enum MavCmd {
1914    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1915    MAV_CMD_NAV_WAYPOINT = 16,
1916    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1917    MAV_CMD_NAV_LOITER_UNLIM = 17,
1918    #[doc = "Loiter around this waypoint for X turns"]
1919    MAV_CMD_NAV_LOITER_TURNS = 18,
1920    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1921    MAV_CMD_NAV_LOITER_TIME = 19,
1922    #[doc = "Return to launch location"]
1923    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1924    #[doc = "Land at location."]
1925    MAV_CMD_NAV_LAND = 21,
1926    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1927    MAV_CMD_NAV_TAKEOFF = 22,
1928    #[doc = "Land at local position (local frame only)"]
1929    MAV_CMD_NAV_LAND_LOCAL = 23,
1930    #[doc = "Takeoff from local position (local frame only)"]
1931    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1932    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1933    MAV_CMD_NAV_FOLLOW = 25,
1934    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1935    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1936    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1937    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1938    #[doc = "Begin following a target"]
1939    MAV_CMD_DO_FOLLOW = 32,
1940    #[doc = "Reposition the MAV after a follow target command has been sent"]
1941    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1942    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1943    MAV_CMD_DO_ORBIT = 34,
1944    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1945    MAV_CMD_NAV_ROI = 80,
1946    #[doc = "Control autonomous path planning on the MAV."]
1947    MAV_CMD_NAV_PATHPLANNING = 81,
1948    #[doc = "Navigate to waypoint using a spline path."]
1949    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1950    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1951    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1952    #[doc = "Land using VTOL mode"]
1953    MAV_CMD_NAV_VTOL_LAND = 85,
1954    #[doc = "hand control over to an external controller"]
1955    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1956    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1957    MAV_CMD_NAV_DELAY = 93,
1958    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1959    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1960    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1961    MAV_CMD_NAV_LAST = 95,
1962    #[doc = "Delay mission state machine."]
1963    MAV_CMD_CONDITION_DELAY = 112,
1964    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1965    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1966    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1967    MAV_CMD_CONDITION_DISTANCE = 114,
1968    #[doc = "Reach a certain target angle."]
1969    MAV_CMD_CONDITION_YAW = 115,
1970    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1971    MAV_CMD_CONDITION_LAST = 159,
1972    #[doc = "Set system mode."]
1973    MAV_CMD_DO_SET_MODE = 176,
1974    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1975    MAV_CMD_DO_JUMP = 177,
1976    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1977    MAV_CMD_DO_CHANGE_SPEED = 178,
1978    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1979    MAV_CMD_DO_SET_HOME = 179,
1980    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1981    MAV_CMD_DO_SET_PARAMETER = 180,
1982    #[doc = "Set a relay to a condition."]
1983    MAV_CMD_DO_SET_RELAY = 181,
1984    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1985    MAV_CMD_DO_REPEAT_RELAY = 182,
1986    #[doc = "Set a servo to a desired PWM value."]
1987    MAV_CMD_DO_SET_SERVO = 183,
1988    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1989    MAV_CMD_DO_REPEAT_SERVO = 184,
1990    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1991    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1992    #[doc = "Change altitude set point."]
1993    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1994    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1995    MAV_CMD_DO_SET_ACTUATOR = 187,
1996    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1997    MAV_CMD_DO_RETURN_PATH_START = 188,
1998    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1999    MAV_CMD_DO_LAND_START = 189,
2000    #[doc = "Mission command to perform a landing from a rally point."]
2001    MAV_CMD_DO_RALLY_LAND = 190,
2002    #[doc = "Mission command to safely abort an autonomous landing."]
2003    MAV_CMD_DO_GO_AROUND = 191,
2004    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
2005    MAV_CMD_DO_REPOSITION = 192,
2006    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
2007    MAV_CMD_DO_PAUSE_CONTINUE = 193,
2008    #[doc = "Set moving direction to forward or reverse."]
2009    MAV_CMD_DO_SET_REVERSE = 194,
2010    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
2011    MAV_CMD_DO_SET_ROI_LOCATION = 195,
2012    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2013    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
2014    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
2015    MAV_CMD_DO_SET_ROI_NONE = 197,
2016    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2017    MAV_CMD_DO_SET_ROI_SYSID = 198,
2018    #[doc = "Control onboard camera system."]
2019    MAV_CMD_DO_CONTROL_VIDEO = 200,
2020    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2021    MAV_CMD_DO_SET_ROI = 201,
2022    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2023    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
2024    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2025    MAV_CMD_DO_DIGICAM_CONTROL = 203,
2026    #[doc = "Mission command to configure a camera or antenna mount"]
2027    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
2028    #[doc = "Mission command to control a camera or antenna mount"]
2029    MAV_CMD_DO_MOUNT_CONTROL = 205,
2030    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
2031    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
2032    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
2033    MAV_CMD_DO_FENCE_ENABLE = 207,
2034    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
2035    MAV_CMD_DO_PARACHUTE = 208,
2036    #[doc = "Command to perform motor test."]
2037    MAV_CMD_DO_MOTOR_TEST = 209,
2038    #[doc = "Change to/from inverted flight."]
2039    MAV_CMD_DO_INVERTED_FLIGHT = 210,
2040    #[doc = "Mission command to operate a gripper."]
2041    MAV_CMD_DO_GRIPPER = 211,
2042    #[doc = "Enable/disable autotune."]
2043    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
2044    #[doc = "Sets a desired vehicle turn angle and speed change."]
2045    MAV_CMD_NAV_SET_YAW_SPEED = 213,
2046    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
2047    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
2048    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
2049    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
2050    #[doc = "set id of master controller"]
2051    MAV_CMD_DO_GUIDED_MASTER = 221,
2052    #[doc = "Set limits for external control"]
2053    MAV_CMD_DO_GUIDED_LIMITS = 222,
2054    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
2055    MAV_CMD_DO_ENGINE_CONTROL = 223,
2056    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
2057    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
2058    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
2059    MAV_CMD_DO_LAST = 240,
2060    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
2061    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
2062    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
2063    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
2064    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
2065    MAV_CMD_PREFLIGHT_UAVCAN = 243,
2066    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
2067    MAV_CMD_PREFLIGHT_STORAGE = 245,
2068    #[doc = "Request the reboot or shutdown of system components."]
2069    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
2070    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
2071    MAV_CMD_OVERRIDE_GOTO = 252,
2072    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
2073    MAV_CMD_OBLIQUE_SURVEY = 260,
2074    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
2075    MAV_CMD_DO_SET_STANDARD_MODE = 262,
2076    #[doc = "start running a mission"]
2077    MAV_CMD_MISSION_START = 300,
2078    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
2079    MAV_CMD_ACTUATOR_TEST = 310,
2080    #[doc = "Actuator configuration command."]
2081    MAV_CMD_CONFIGURE_ACTUATOR = 311,
2082    #[doc = "Arms / Disarms a component"]
2083    MAV_CMD_COMPONENT_ARM_DISARM = 400,
2084    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
2085    MAV_CMD_RUN_PREARM_CHECKS = 401,
2086    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2087    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
2088    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2089    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
2090    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
2091    MAV_CMD_GET_HOME_POSITION = 410,
2092    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
2093    MAV_CMD_INJECT_FAILURE = 420,
2094    #[doc = "Starts receiver pairing."]
2095    MAV_CMD_START_RX_PAIR = 500,
2096    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
2097    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
2098    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
2099    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
2100    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
2101    MAV_CMD_REQUEST_MESSAGE = 512,
2102    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
2103    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
2104    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
2105    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
2106    #[doc = "Request camera information (CAMERA_INFORMATION)."]
2107    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
2108    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
2109    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
2110    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
2111    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
2112    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
2113    MAV_CMD_STORAGE_FORMAT = 526,
2114    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
2115    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
2116    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
2117    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
2118    #[doc = "Reset all camera settings to Factory Default"]
2119    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
2120    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
2121    MAV_CMD_SET_CAMERA_MODE = 530,
2122    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2123    MAV_CMD_SET_CAMERA_ZOOM = 531,
2124    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2125    MAV_CMD_SET_CAMERA_FOCUS = 532,
2126    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
2127    MAV_CMD_SET_STORAGE_USAGE = 533,
2128    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
2129    MAV_CMD_SET_CAMERA_SOURCE = 534,
2130    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
2131    MAV_CMD_JUMP_TAG = 600,
2132    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
2133    MAV_CMD_DO_JUMP_TAG = 601,
2134    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
2135    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
2136    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
2137    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
2138    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2139    MAV_CMD_IMAGE_START_CAPTURE = 2000,
2140    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2141    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
2142    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
2143    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
2144    #[doc = "Enable or disable on-board camera triggering system."]
2145    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
2146    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
2147    MAV_CMD_CAMERA_TRACK_POINT = 2004,
2148    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
2149    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
2150    #[doc = "Stops ongoing tracking."]
2151    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
2152    #[doc = "Starts video capture (recording)."]
2153    MAV_CMD_VIDEO_START_CAPTURE = 2500,
2154    #[doc = "Stop the current video capture (recording)."]
2155    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
2156    #[doc = "Start video streaming"]
2157    MAV_CMD_VIDEO_START_STREAMING = 2502,
2158    #[doc = "Stop the given video stream"]
2159    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
2160    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
2161    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
2162    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
2163    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
2164    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
2165    MAV_CMD_LOGGING_START = 2510,
2166    #[doc = "Request to stop streaming log data over MAVLink"]
2167    MAV_CMD_LOGGING_STOP = 2511,
2168    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
2169    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
2170    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
2171    #[doc = "Create a panorama at the current position"]
2172    MAV_CMD_PANORAMA_CREATE = 2800,
2173    #[doc = "Request VTOL transition"]
2174    MAV_CMD_DO_VTOL_TRANSITION = 3000,
2175    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
2176    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
2177    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
2178    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
2179    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
2180    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
2181    #[doc = "Delay mission state machine until gate has been reached."]
2182    MAV_CMD_CONDITION_GATE = 4501,
2183    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
2184    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
2185    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
2186    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
2187    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
2188    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
2189    #[doc = "Circular fence area. The vehicle must stay inside this area."]
2190    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
2191    #[doc = "Circular fence area. The vehicle must stay outside this area."]
2192    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
2193    #[doc = "Rally point. You can have multiple rally points defined."]
2194    MAV_CMD_NAV_RALLY_POINT = 5100,
2195    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
2196    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
2197    #[doc = "Change state of safety switch."]
2198    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
2199    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
2200    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
2201    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
2202    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
2203    #[doc = "Control the payload deployment."]
2204    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
2205    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
2206    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
2207    #[doc = "Command to operate winch."]
2208    MAV_CMD_DO_WINCH = 42600,
2209    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
2210    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
2211    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2212    MAV_CMD_WAYPOINT_USER_1 = 31000,
2213    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2214    MAV_CMD_WAYPOINT_USER_2 = 31001,
2215    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2216    MAV_CMD_WAYPOINT_USER_3 = 31002,
2217    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2218    MAV_CMD_WAYPOINT_USER_4 = 31003,
2219    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2220    MAV_CMD_WAYPOINT_USER_5 = 31004,
2221    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2222    MAV_CMD_SPATIAL_USER_1 = 31005,
2223    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2224    MAV_CMD_SPATIAL_USER_2 = 31006,
2225    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2226    MAV_CMD_SPATIAL_USER_3 = 31007,
2227    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2228    MAV_CMD_SPATIAL_USER_4 = 31008,
2229    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2230    MAV_CMD_SPATIAL_USER_5 = 31009,
2231    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2232    MAV_CMD_USER_1 = 31010,
2233    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2234    MAV_CMD_USER_2 = 31011,
2235    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2236    MAV_CMD_USER_3 = 31012,
2237    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2238    MAV_CMD_USER_4 = 31013,
2239    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2240    MAV_CMD_USER_5 = 31014,
2241    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
2242    MAV_CMD_CAN_FORWARD = 32000,
2243}
2244impl MavCmd {
2245    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
2246}
2247impl Default for MavCmd {
2248    fn default() -> Self {
2249        Self::DEFAULT
2250    }
2251}
2252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2254#[cfg_attr(feature = "serde", serde(tag = "type"))]
2255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2256#[repr(u32)]
2257#[doc = "Result from a MAVLink command (MAV_CMD)"]
2258pub enum MavResult {
2259    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
2260    MAV_RESULT_ACCEPTED = 0,
2261    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
2262    MAV_RESULT_TEMPORARILY_REJECTED = 1,
2263    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
2264    MAV_RESULT_DENIED = 2,
2265    #[doc = "Command is not supported (unknown)."]
2266    MAV_RESULT_UNSUPPORTED = 3,
2267    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
2268    MAV_RESULT_FAILED = 4,
2269    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
2270    MAV_RESULT_IN_PROGRESS = 5,
2271    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
2272    MAV_RESULT_CANCELLED = 6,
2273    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
2274    MAV_RESULT_COMMAND_LONG_ONLY = 7,
2275    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
2276    MAV_RESULT_COMMAND_INT_ONLY = 8,
2277    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
2278    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
2279}
2280impl MavResult {
2281    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
2282}
2283impl Default for MavResult {
2284    fn default() -> Self {
2285        Self::DEFAULT
2286    }
2287}
2288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "serde", serde(tag = "type"))]
2291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2292#[repr(u32)]
2293#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
2294pub enum AisType {
2295    #[doc = "Not available (default)."]
2296    AIS_TYPE_UNKNOWN = 0,
2297    AIS_TYPE_RESERVED_1 = 1,
2298    AIS_TYPE_RESERVED_2 = 2,
2299    AIS_TYPE_RESERVED_3 = 3,
2300    AIS_TYPE_RESERVED_4 = 4,
2301    AIS_TYPE_RESERVED_5 = 5,
2302    AIS_TYPE_RESERVED_6 = 6,
2303    AIS_TYPE_RESERVED_7 = 7,
2304    AIS_TYPE_RESERVED_8 = 8,
2305    AIS_TYPE_RESERVED_9 = 9,
2306    AIS_TYPE_RESERVED_10 = 10,
2307    AIS_TYPE_RESERVED_11 = 11,
2308    AIS_TYPE_RESERVED_12 = 12,
2309    AIS_TYPE_RESERVED_13 = 13,
2310    AIS_TYPE_RESERVED_14 = 14,
2311    AIS_TYPE_RESERVED_15 = 15,
2312    AIS_TYPE_RESERVED_16 = 16,
2313    AIS_TYPE_RESERVED_17 = 17,
2314    AIS_TYPE_RESERVED_18 = 18,
2315    AIS_TYPE_RESERVED_19 = 19,
2316    #[doc = "Wing In Ground effect."]
2317    AIS_TYPE_WIG = 20,
2318    AIS_TYPE_WIG_HAZARDOUS_A = 21,
2319    AIS_TYPE_WIG_HAZARDOUS_B = 22,
2320    AIS_TYPE_WIG_HAZARDOUS_C = 23,
2321    AIS_TYPE_WIG_HAZARDOUS_D = 24,
2322    AIS_TYPE_WIG_RESERVED_1 = 25,
2323    AIS_TYPE_WIG_RESERVED_2 = 26,
2324    AIS_TYPE_WIG_RESERVED_3 = 27,
2325    AIS_TYPE_WIG_RESERVED_4 = 28,
2326    AIS_TYPE_WIG_RESERVED_5 = 29,
2327    AIS_TYPE_FISHING = 30,
2328    AIS_TYPE_TOWING = 31,
2329    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
2330    AIS_TYPE_TOWING_LARGE = 32,
2331    #[doc = "Dredging or other underwater ops."]
2332    AIS_TYPE_DREDGING = 33,
2333    AIS_TYPE_DIVING = 34,
2334    AIS_TYPE_MILITARY = 35,
2335    AIS_TYPE_SAILING = 36,
2336    AIS_TYPE_PLEASURE = 37,
2337    AIS_TYPE_RESERVED_20 = 38,
2338    AIS_TYPE_RESERVED_21 = 39,
2339    #[doc = "High Speed Craft."]
2340    AIS_TYPE_HSC = 40,
2341    AIS_TYPE_HSC_HAZARDOUS_A = 41,
2342    AIS_TYPE_HSC_HAZARDOUS_B = 42,
2343    AIS_TYPE_HSC_HAZARDOUS_C = 43,
2344    AIS_TYPE_HSC_HAZARDOUS_D = 44,
2345    AIS_TYPE_HSC_RESERVED_1 = 45,
2346    AIS_TYPE_HSC_RESERVED_2 = 46,
2347    AIS_TYPE_HSC_RESERVED_3 = 47,
2348    AIS_TYPE_HSC_RESERVED_4 = 48,
2349    AIS_TYPE_HSC_UNKNOWN = 49,
2350    AIS_TYPE_PILOT = 50,
2351    #[doc = "Search And Rescue vessel."]
2352    AIS_TYPE_SAR = 51,
2353    AIS_TYPE_TUG = 52,
2354    AIS_TYPE_PORT_TENDER = 53,
2355    #[doc = "Anti-pollution equipment."]
2356    AIS_TYPE_ANTI_POLLUTION = 54,
2357    AIS_TYPE_LAW_ENFORCEMENT = 55,
2358    AIS_TYPE_SPARE_LOCAL_1 = 56,
2359    AIS_TYPE_SPARE_LOCAL_2 = 57,
2360    AIS_TYPE_MEDICAL_TRANSPORT = 58,
2361    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
2362    AIS_TYPE_NONECOMBATANT = 59,
2363    AIS_TYPE_PASSENGER = 60,
2364    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
2365    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
2366    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
2367    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
2368    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
2369    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
2370    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
2371    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
2372    AIS_TYPE_PASSENGER_UNKNOWN = 69,
2373    AIS_TYPE_CARGO = 70,
2374    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
2375    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
2376    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
2377    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
2378    AIS_TYPE_CARGO_RESERVED_1 = 75,
2379    AIS_TYPE_CARGO_RESERVED_2 = 76,
2380    AIS_TYPE_CARGO_RESERVED_3 = 77,
2381    AIS_TYPE_CARGO_RESERVED_4 = 78,
2382    AIS_TYPE_CARGO_UNKNOWN = 79,
2383    AIS_TYPE_TANKER = 80,
2384    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
2385    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
2386    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
2387    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
2388    AIS_TYPE_TANKER_RESERVED_1 = 85,
2389    AIS_TYPE_TANKER_RESERVED_2 = 86,
2390    AIS_TYPE_TANKER_RESERVED_3 = 87,
2391    AIS_TYPE_TANKER_RESERVED_4 = 88,
2392    AIS_TYPE_TANKER_UNKNOWN = 89,
2393    AIS_TYPE_OTHER = 90,
2394    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
2395    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
2396    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
2397    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
2398    AIS_TYPE_OTHER_RESERVED_1 = 95,
2399    AIS_TYPE_OTHER_RESERVED_2 = 96,
2400    AIS_TYPE_OTHER_RESERVED_3 = 97,
2401    AIS_TYPE_OTHER_RESERVED_4 = 98,
2402    AIS_TYPE_OTHER_UNKNOWN = 99,
2403}
2404impl AisType {
2405    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
2406}
2407impl Default for AisType {
2408    fn default() -> Self {
2409        Self::DEFAULT
2410    }
2411}
2412bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
2413impl MavBatteryFault {
2414    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
2415}
2416impl Default for MavBatteryFault {
2417    fn default() -> Self {
2418        Self::DEFAULT
2419    }
2420}
2421#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2423#[cfg_attr(feature = "serde", serde(tag = "type"))]
2424#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2425#[repr(u32)]
2426#[doc = "Enumeration of sensor orientation, according to its rotations"]
2427pub enum MavSensorOrientation {
2428    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
2429    MAV_SENSOR_ROTATION_NONE = 0,
2430    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
2431    MAV_SENSOR_ROTATION_YAW_45 = 1,
2432    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
2433    MAV_SENSOR_ROTATION_YAW_90 = 2,
2434    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
2435    MAV_SENSOR_ROTATION_YAW_135 = 3,
2436    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
2437    MAV_SENSOR_ROTATION_YAW_180 = 4,
2438    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
2439    MAV_SENSOR_ROTATION_YAW_225 = 5,
2440    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
2441    MAV_SENSOR_ROTATION_YAW_270 = 6,
2442    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
2443    MAV_SENSOR_ROTATION_YAW_315 = 7,
2444    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
2445    MAV_SENSOR_ROTATION_ROLL_180 = 8,
2446    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
2447    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
2448    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
2449    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
2450    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
2451    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
2452    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
2453    MAV_SENSOR_ROTATION_PITCH_180 = 12,
2454    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
2455    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
2456    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
2457    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
2458    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
2459    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
2460    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
2461    MAV_SENSOR_ROTATION_ROLL_90 = 16,
2462    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
2463    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
2464    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
2465    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
2466    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
2467    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
2468    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
2469    MAV_SENSOR_ROTATION_ROLL_270 = 20,
2470    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
2471    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
2472    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
2473    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
2474    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
2475    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
2476    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
2477    MAV_SENSOR_ROTATION_PITCH_90 = 24,
2478    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
2479    MAV_SENSOR_ROTATION_PITCH_270 = 25,
2480    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
2481    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
2482    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
2483    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
2484    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
2485    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
2486    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
2487    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
2488    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
2489    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
2490    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
2491    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
2492    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
2493    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
2494    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
2495    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
2496    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
2497    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
2498    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
2499    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
2500    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
2501    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
2502    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
2503    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
2504    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
2505    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
2506    #[doc = "Pitch: 315"]
2507    MAV_SENSOR_ROTATION_PITCH_315 = 39,
2508    #[doc = "Roll: 90, Pitch: 315"]
2509    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
2510    #[doc = "Custom orientation"]
2511    MAV_SENSOR_ROTATION_CUSTOM = 100,
2512}
2513impl MavSensorOrientation {
2514    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
2515}
2516impl Default for MavSensorOrientation {
2517    fn default() -> Self {
2518        Self::DEFAULT
2519    }
2520}
2521#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2523#[cfg_attr(feature = "serde", serde(tag = "type"))]
2524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2525#[repr(u32)]
2526#[doc = "WiFi Mode."]
2527pub enum WifiConfigApMode {
2528    #[doc = "WiFi mode is undefined."]
2529    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
2530    #[doc = "WiFi configured as an access point."]
2531    WIFI_CONFIG_AP_MODE_AP = 1,
2532    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
2533    WIFI_CONFIG_AP_MODE_STATION = 2,
2534    #[doc = "WiFi disabled."]
2535    WIFI_CONFIG_AP_MODE_DISABLED = 3,
2536}
2537impl WifiConfigApMode {
2538    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
2539}
2540impl Default for WifiConfigApMode {
2541    fn default() -> Self {
2542        Self::DEFAULT
2543    }
2544}
2545#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2547#[cfg_attr(feature = "serde", serde(tag = "type"))]
2548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2549#[repr(u32)]
2550pub enum MavTunnelPayloadType {
2551    #[doc = "Encoding of payload unknown."]
2552    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
2553    #[doc = "Registered for STorM32 gimbal controller."]
2554    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
2555    #[doc = "Registered for STorM32 gimbal controller."]
2556    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
2557    #[doc = "Registered for STorM32 gimbal controller."]
2558    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
2559    #[doc = "Registered for STorM32 gimbal controller."]
2560    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
2561    #[doc = "Registered for STorM32 gimbal controller."]
2562    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
2563    #[doc = "Registered for STorM32 gimbal controller."]
2564    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
2565    #[doc = "Registered for STorM32 gimbal controller."]
2566    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
2567    #[doc = "Registered for STorM32 gimbal controller."]
2568    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
2569    #[doc = "Registered for STorM32 gimbal controller."]
2570    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
2571    #[doc = "Registered for STorM32 gimbal controller."]
2572    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
2573    #[doc = "Registered for ModalAI remote OSD protocol."]
2574    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
2575    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
2576    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
2577    #[doc = "Registered for ModalAI vendor use."]
2578    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
2579}
2580impl MavTunnelPayloadType {
2581    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
2582}
2583impl Default for MavTunnelPayloadType {
2584    fn default() -> Self {
2585        Self::DEFAULT
2586    }
2587}
2588#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2590#[cfg_attr(feature = "serde", serde(tag = "type"))]
2591#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2592#[repr(u32)]
2593#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
2594pub enum MavSeverity {
2595    #[doc = "System is unusable. This is a \"panic\" condition."]
2596    MAV_SEVERITY_EMERGENCY = 0,
2597    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
2598    MAV_SEVERITY_ALERT = 1,
2599    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
2600    MAV_SEVERITY_CRITICAL = 2,
2601    #[doc = "Indicates an error in secondary/redundant systems."]
2602    MAV_SEVERITY_ERROR = 3,
2603    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
2604    MAV_SEVERITY_WARNING = 4,
2605    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
2606    MAV_SEVERITY_NOTICE = 5,
2607    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
2608    MAV_SEVERITY_INFO = 6,
2609    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
2610    MAV_SEVERITY_DEBUG = 7,
2611}
2612impl MavSeverity {
2613    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
2614}
2615impl Default for MavSeverity {
2616    fn default() -> Self {
2617        Self::DEFAULT
2618    }
2619}
2620#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2622#[cfg_attr(feature = "serde", serde(tag = "type"))]
2623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2624#[repr(u32)]
2625#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
2626pub enum AdsbEmitterType {
2627    ADSB_EMITTER_TYPE_NO_INFO = 0,
2628    ADSB_EMITTER_TYPE_LIGHT = 1,
2629    ADSB_EMITTER_TYPE_SMALL = 2,
2630    ADSB_EMITTER_TYPE_LARGE = 3,
2631    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
2632    ADSB_EMITTER_TYPE_HEAVY = 5,
2633    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
2634    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
2635    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
2636    ADSB_EMITTER_TYPE_GLIDER = 9,
2637    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
2638    ADSB_EMITTER_TYPE_PARACHUTE = 11,
2639    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
2640    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
2641    ADSB_EMITTER_TYPE_UAV = 14,
2642    ADSB_EMITTER_TYPE_SPACE = 15,
2643    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
2644    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
2645    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
2646    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
2647}
2648impl AdsbEmitterType {
2649    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
2650}
2651impl Default for AdsbEmitterType {
2652    fn default() -> Self {
2653        Self::DEFAULT
2654    }
2655}
2656#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2658#[cfg_attr(feature = "serde", serde(tag = "type"))]
2659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2660#[repr(u32)]
2661pub enum MavlinkDataStreamType {
2662    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
2663    MAVLINK_DATA_STREAM_IMG_BMP = 1,
2664    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
2665    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
2666    MAVLINK_DATA_STREAM_IMG_PGM = 4,
2667    MAVLINK_DATA_STREAM_IMG_PNG = 5,
2668}
2669impl MavlinkDataStreamType {
2670    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
2671}
2672impl Default for MavlinkDataStreamType {
2673    fn default() -> Self {
2674        Self::DEFAULT
2675    }
2676}
2677#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2679#[cfg_attr(feature = "serde", serde(tag = "type"))]
2680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2681#[repr(u32)]
2682#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
2683pub enum CameraZoomType {
2684    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
2685    ZOOM_TYPE_STEP = 0,
2686    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
2687    ZOOM_TYPE_CONTINUOUS = 1,
2688    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
2689    ZOOM_TYPE_RANGE = 2,
2690    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
2691    ZOOM_TYPE_FOCAL_LENGTH = 3,
2692    #[doc = "Zoom value as horizontal field of view in degrees."]
2693    ZOOM_TYPE_HORIZONTAL_FOV = 4,
2694}
2695impl CameraZoomType {
2696    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
2697}
2698impl Default for CameraZoomType {
2699    fn default() -> Self {
2700        Self::DEFAULT
2701    }
2702}
2703#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2704#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2705#[cfg_attr(feature = "serde", serde(tag = "type"))]
2706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2707#[repr(u32)]
2708#[doc = "List of possible units where failures can be injected."]
2709pub enum FailureUnit {
2710    FAILURE_UNIT_SENSOR_GYRO = 0,
2711    FAILURE_UNIT_SENSOR_ACCEL = 1,
2712    FAILURE_UNIT_SENSOR_MAG = 2,
2713    FAILURE_UNIT_SENSOR_BARO = 3,
2714    FAILURE_UNIT_SENSOR_GPS = 4,
2715    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
2716    FAILURE_UNIT_SENSOR_VIO = 6,
2717    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
2718    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
2719    FAILURE_UNIT_SYSTEM_BATTERY = 100,
2720    FAILURE_UNIT_SYSTEM_MOTOR = 101,
2721    FAILURE_UNIT_SYSTEM_SERVO = 102,
2722    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
2723    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
2724    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
2725}
2726impl FailureUnit {
2727    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
2728}
2729impl Default for FailureUnit {
2730    fn default() -> Self {
2731        Self::DEFAULT
2732    }
2733}
2734#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2736#[cfg_attr(feature = "serde", serde(tag = "type"))]
2737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2738#[repr(u32)]
2739#[doc = "Video stream encodings"]
2740pub enum VideoStreamEncoding {
2741    #[doc = "Stream encoding is unknown"]
2742    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
2743    #[doc = "Stream encoding is H.264"]
2744    VIDEO_STREAM_ENCODING_H264 = 1,
2745    #[doc = "Stream encoding is H.265"]
2746    VIDEO_STREAM_ENCODING_H265 = 2,
2747}
2748impl VideoStreamEncoding {
2749    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
2750}
2751impl Default for VideoStreamEncoding {
2752    fn default() -> Self {
2753        Self::DEFAULT
2754    }
2755}
2756#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2758#[cfg_attr(feature = "serde", serde(tag = "type"))]
2759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2760#[repr(u32)]
2761#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
2762pub enum CameraSource {
2763    #[doc = "Default camera source."]
2764    CAMERA_SOURCE_DEFAULT = 0,
2765    #[doc = "RGB camera source."]
2766    CAMERA_SOURCE_RGB = 1,
2767    #[doc = "IR camera source."]
2768    CAMERA_SOURCE_IR = 2,
2769    #[doc = "NDVI camera source."]
2770    CAMERA_SOURCE_NDVI = 3,
2771}
2772impl CameraSource {
2773    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
2774}
2775impl Default for CameraSource {
2776    fn default() -> Self {
2777        Self::DEFAULT
2778    }
2779}
2780#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2782#[cfg_attr(feature = "serde", serde(tag = "type"))]
2783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2784#[repr(u32)]
2785#[doc = "List of possible failure type to inject."]
2786pub enum FailureType {
2787    #[doc = "No failure injected, used to reset a previous failure."]
2788    FAILURE_TYPE_OK = 0,
2789    #[doc = "Sets unit off, so completely non-responsive."]
2790    FAILURE_TYPE_OFF = 1,
2791    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
2792    FAILURE_TYPE_STUCK = 2,
2793    #[doc = "Unit is reporting complete garbage."]
2794    FAILURE_TYPE_GARBAGE = 3,
2795    #[doc = "Unit is consistently wrong."]
2796    FAILURE_TYPE_WRONG = 4,
2797    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
2798    FAILURE_TYPE_SLOW = 5,
2799    #[doc = "Data of unit is delayed in time."]
2800    FAILURE_TYPE_DELAYED = 6,
2801    #[doc = "Unit is sometimes working, sometimes not."]
2802    FAILURE_TYPE_INTERMITTENT = 7,
2803}
2804impl FailureType {
2805    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
2806}
2807impl Default for FailureType {
2808    fn default() -> Self {
2809        Self::DEFAULT
2810    }
2811}
2812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2814#[cfg_attr(feature = "serde", serde(tag = "type"))]
2815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2816#[repr(u32)]
2817#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2818pub enum MavFtpOpcode {
2819    #[doc = "None. Ignored, always ACKed"]
2820    MAV_FTP_OPCODE_NONE = 0,
2821    #[doc = "TerminateSession: Terminates open Read session"]
2822    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2823    #[doc = "ResetSessions: Terminates all open read sessions"]
2824    MAV_FTP_OPCODE_RESETSESSION = 2,
2825    #[doc = "ListDirectory. List files and directories in path from offset"]
2826    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2827    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2828    MAV_FTP_OPCODE_OPENFILERO = 4,
2829    #[doc = "ReadFile: Reads size bytes from offset in session"]
2830    MAV_FTP_OPCODE_READFILE = 5,
2831    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2832    MAV_FTP_OPCODE_CREATEFILE = 6,
2833    #[doc = "WriteFile: Writes size bytes to offset in session"]
2834    MAV_FTP_OPCODE_WRITEFILE = 7,
2835    #[doc = "RemoveFile: Remove file at path"]
2836    MAV_FTP_OPCODE_REMOVEFILE = 8,
2837    #[doc = "CreateDirectory: Creates directory at path"]
2838    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2839    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2840    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2841    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2842    MAV_FTP_OPCODE_OPENFILEWO = 11,
2843    #[doc = "TruncateFile: Truncate file at path to offset length"]
2844    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2845    #[doc = "Rename: Rename path1 to path2"]
2846    MAV_FTP_OPCODE_RENAME = 13,
2847    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2848    MAV_FTP_OPCODE_CALCFILECRC = 14,
2849    #[doc = "BurstReadFile: Burst download session file"]
2850    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2851    #[doc = "ACK: ACK response"]
2852    MAV_FTP_OPCODE_ACK = 128,
2853    #[doc = "NAK: NAK response"]
2854    MAV_FTP_OPCODE_NAK = 129,
2855}
2856impl MavFtpOpcode {
2857    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2858}
2859impl Default for MavFtpOpcode {
2860    fn default() -> Self {
2861        Self::DEFAULT
2862    }
2863}
2864#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2866#[cfg_attr(feature = "serde", serde(tag = "type"))]
2867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2868#[repr(u32)]
2869#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
2870pub enum MissionState {
2871    #[doc = "The mission status reporting is not supported."]
2872    MISSION_STATE_UNKNOWN = 0,
2873    #[doc = "No mission on the vehicle."]
2874    MISSION_STATE_NO_MISSION = 1,
2875    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
2876    MISSION_STATE_NOT_STARTED = 2,
2877    #[doc = "Mission is active, and will execute mission items when in auto mode."]
2878    MISSION_STATE_ACTIVE = 3,
2879    #[doc = "Mission is paused when in auto mode."]
2880    MISSION_STATE_PAUSED = 4,
2881    #[doc = "Mission has executed all mission items."]
2882    MISSION_STATE_COMPLETE = 5,
2883}
2884impl MissionState {
2885    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
2886}
2887impl Default for MissionState {
2888    fn default() -> Self {
2889        Self::DEFAULT
2890    }
2891}
2892bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
2893impl GimbalDeviceErrorFlags {
2894    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
2895}
2896impl Default for GimbalDeviceErrorFlags {
2897    fn default() -> Self {
2898        Self::DEFAULT
2899    }
2900}
2901bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
2902impl AisFlags {
2903    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
2904}
2905impl Default for AisFlags {
2906    fn default() -> Self {
2907        Self::DEFAULT
2908    }
2909}
2910#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2912#[cfg_attr(feature = "serde", serde(tag = "type"))]
2913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2914#[repr(u32)]
2915#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
2916pub enum ActuatorOutputFunction {
2917    #[doc = "No function (disabled)."]
2918    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
2919    #[doc = "Motor 1"]
2920    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
2921    #[doc = "Motor 2"]
2922    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
2923    #[doc = "Motor 3"]
2924    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
2925    #[doc = "Motor 4"]
2926    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
2927    #[doc = "Motor 5"]
2928    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
2929    #[doc = "Motor 6"]
2930    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
2931    #[doc = "Motor 7"]
2932    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
2933    #[doc = "Motor 8"]
2934    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
2935    #[doc = "Motor 9"]
2936    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
2937    #[doc = "Motor 10"]
2938    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
2939    #[doc = "Motor 11"]
2940    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
2941    #[doc = "Motor 12"]
2942    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
2943    #[doc = "Motor 13"]
2944    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
2945    #[doc = "Motor 14"]
2946    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
2947    #[doc = "Motor 15"]
2948    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
2949    #[doc = "Motor 16"]
2950    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
2951    #[doc = "Servo 1"]
2952    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
2953    #[doc = "Servo 2"]
2954    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
2955    #[doc = "Servo 3"]
2956    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
2957    #[doc = "Servo 4"]
2958    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
2959    #[doc = "Servo 5"]
2960    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
2961    #[doc = "Servo 6"]
2962    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
2963    #[doc = "Servo 7"]
2964    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
2965    #[doc = "Servo 8"]
2966    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
2967    #[doc = "Servo 9"]
2968    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
2969    #[doc = "Servo 10"]
2970    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
2971    #[doc = "Servo 11"]
2972    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
2973    #[doc = "Servo 12"]
2974    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
2975    #[doc = "Servo 13"]
2976    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
2977    #[doc = "Servo 14"]
2978    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
2979    #[doc = "Servo 15"]
2980    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
2981    #[doc = "Servo 16"]
2982    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
2983}
2984impl ActuatorOutputFunction {
2985    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
2986}
2987impl Default for ActuatorOutputFunction {
2988    fn default() -> Self {
2989        Self::DEFAULT
2990    }
2991}
2992#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2993#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2994#[cfg_attr(feature = "serde", serde(tag = "type"))]
2995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2996#[repr(u32)]
2997pub enum NavVtolLandOptions {
2998    #[doc = "Default autopilot landing behaviour."]
2999    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3000    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3001    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3002    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3003    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3004}
3005impl NavVtolLandOptions {
3006    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3007}
3008impl Default for NavVtolLandOptions {
3009    fn default() -> Self {
3010        Self::DEFAULT
3011    }
3012}
3013#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3015#[cfg_attr(feature = "serde", serde(tag = "type"))]
3016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3017#[repr(u32)]
3018#[doc = "Result of mission operation (in a MISSION_ACK message)."]
3019pub enum MavMissionResult {
3020    #[doc = "mission accepted OK"]
3021    MAV_MISSION_ACCEPTED = 0,
3022    #[doc = "Generic error / not accepting mission commands at all right now."]
3023    MAV_MISSION_ERROR = 1,
3024    #[doc = "Coordinate frame is not supported."]
3025    MAV_MISSION_UNSUPPORTED_FRAME = 2,
3026    #[doc = "Command is not supported."]
3027    MAV_MISSION_UNSUPPORTED = 3,
3028    #[doc = "Mission items exceed storage space."]
3029    MAV_MISSION_NO_SPACE = 4,
3030    #[doc = "One of the parameters has an invalid value."]
3031    MAV_MISSION_INVALID = 5,
3032    #[doc = "param1 has an invalid value."]
3033    MAV_MISSION_INVALID_PARAM1 = 6,
3034    #[doc = "param2 has an invalid value."]
3035    MAV_MISSION_INVALID_PARAM2 = 7,
3036    #[doc = "param3 has an invalid value."]
3037    MAV_MISSION_INVALID_PARAM3 = 8,
3038    #[doc = "param4 has an invalid value."]
3039    MAV_MISSION_INVALID_PARAM4 = 9,
3040    #[doc = "x / param5 has an invalid value."]
3041    MAV_MISSION_INVALID_PARAM5_X = 10,
3042    #[doc = "y / param6 has an invalid value."]
3043    MAV_MISSION_INVALID_PARAM6_Y = 11,
3044    #[doc = "z / param7 has an invalid value."]
3045    MAV_MISSION_INVALID_PARAM7 = 12,
3046    #[doc = "Mission item received out of sequence"]
3047    MAV_MISSION_INVALID_SEQUENCE = 13,
3048    #[doc = "Not accepting any mission commands from this communication partner."]
3049    MAV_MISSION_DENIED = 14,
3050    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
3051    MAV_MISSION_OPERATION_CANCELLED = 15,
3052}
3053impl MavMissionResult {
3054    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
3055}
3056impl Default for MavMissionResult {
3057    fn default() -> Self {
3058        Self::DEFAULT
3059    }
3060}
3061#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3063#[cfg_attr(feature = "serde", serde(tag = "type"))]
3064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3065#[repr(u32)]
3066#[doc = "Enumeration of battery functions"]
3067pub enum MavBatteryFunction {
3068    #[doc = "Battery function is unknown"]
3069    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
3070    #[doc = "Battery supports all flight systems"]
3071    MAV_BATTERY_FUNCTION_ALL = 1,
3072    #[doc = "Battery for the propulsion system"]
3073    MAV_BATTERY_FUNCTION_PROPULSION = 2,
3074    #[doc = "Avionics battery"]
3075    MAV_BATTERY_FUNCTION_AVIONICS = 3,
3076    #[doc = "Payload battery"]
3077    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
3078}
3079impl MavBatteryFunction {
3080    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
3081}
3082impl Default for MavBatteryFunction {
3083    fn default() -> Self {
3084        Self::DEFAULT
3085    }
3086}
3087bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
3088impl VideoStreamStatusFlags {
3089    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
3090}
3091impl Default for VideoStreamStatusFlags {
3092    fn default() -> Self {
3093        Self::DEFAULT
3094    }
3095}
3096bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
3097impl GimbalDeviceFlags {
3098    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
3099}
3100impl Default for GimbalDeviceFlags {
3101    fn default() -> Self {
3102        Self::DEFAULT
3103    }
3104}
3105#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3107#[cfg_attr(feature = "serde", serde(tag = "type"))]
3108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3109#[repr(u32)]
3110#[doc = "Possible actions an aircraft can take to avoid a collision."]
3111pub enum MavCollisionAction {
3112    #[doc = "Ignore any potential collisions"]
3113    MAV_COLLISION_ACTION_NONE = 0,
3114    #[doc = "Report potential collision"]
3115    MAV_COLLISION_ACTION_REPORT = 1,
3116    #[doc = "Ascend or Descend to avoid threat"]
3117    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
3118    #[doc = "Move horizontally to avoid threat"]
3119    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
3120    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
3121    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
3122    #[doc = "Aircraft to fly directly back to its launch point"]
3123    MAV_COLLISION_ACTION_RTL = 5,
3124    #[doc = "Aircraft to stop in place"]
3125    MAV_COLLISION_ACTION_HOVER = 6,
3126}
3127impl MavCollisionAction {
3128    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
3129}
3130impl Default for MavCollisionAction {
3131    fn default() -> Self {
3132        Self::DEFAULT
3133    }
3134}
3135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3137#[cfg_attr(feature = "serde", serde(tag = "type"))]
3138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3139#[repr(u32)]
3140#[doc = "Video stream types"]
3141pub enum VideoStreamType {
3142    #[doc = "Stream is RTSP"]
3143    VIDEO_STREAM_TYPE_RTSP = 0,
3144    #[doc = "Stream is RTP UDP (URI gives the port number)"]
3145    VIDEO_STREAM_TYPE_RTPUDP = 1,
3146    #[doc = "Stream is MPEG on TCP"]
3147    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
3148    #[doc = "Stream is MPEG TS (URI gives the port number)"]
3149    VIDEO_STREAM_TYPE_MPEG_TS = 3,
3150}
3151impl VideoStreamType {
3152    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
3153}
3154impl Default for VideoStreamType {
3155    fn default() -> Self {
3156        Self::DEFAULT
3157    }
3158}
3159#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3161#[cfg_attr(feature = "serde", serde(tag = "type"))]
3162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3163#[repr(u32)]
3164pub enum MavOdidOperatorLocationType {
3165    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3166    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3167    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3168    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3169    #[doc = "The location/altitude of the operator are fixed values."]
3170    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3171}
3172impl MavOdidOperatorLocationType {
3173    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3174}
3175impl Default for MavOdidOperatorLocationType {
3176    fn default() -> Self {
3177        Self::DEFAULT
3178    }
3179}
3180#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3182#[cfg_attr(feature = "serde", serde(tag = "type"))]
3183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3184#[repr(u32)]
3185pub enum MavOdidCategoryEu {
3186    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
3187    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
3188    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
3189    MAV_ODID_CATEGORY_EU_OPEN = 1,
3190    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
3191    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
3192    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
3193    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
3194}
3195impl MavOdidCategoryEu {
3196    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
3197}
3198impl Default for MavOdidCategoryEu {
3199    fn default() -> Self {
3200        Self::DEFAULT
3201    }
3202}
3203#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3205#[cfg_attr(feature = "serde", serde(tag = "type"))]
3206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3207#[repr(u32)]
3208#[doc = "Modes of illuminator"]
3209pub enum IlluminatorMode {
3210    #[doc = "Illuminator mode is not specified/unknown"]
3211    ILLUMINATOR_MODE_UNKNOWN = 0,
3212    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
3213    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
3214    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
3215    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
3216}
3217impl IlluminatorMode {
3218    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
3219}
3220impl Default for IlluminatorMode {
3221    fn default() -> Self {
3222        Self::DEFAULT
3223    }
3224}
3225#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3227#[cfg_attr(feature = "serde", serde(tag = "type"))]
3228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3229#[repr(u32)]
3230#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3231pub enum ParachuteAction {
3232    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3233    PARACHUTE_DISABLE = 0,
3234    #[doc = "Enable auto-release of parachute."]
3235    PARACHUTE_ENABLE = 1,
3236    #[doc = "Release parachute and kill motors."]
3237    PARACHUTE_RELEASE = 2,
3238}
3239impl ParachuteAction {
3240    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3241}
3242impl Default for ParachuteAction {
3243    fn default() -> Self {
3244        Self::DEFAULT
3245    }
3246}
3247bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
3248impl HilSensorUpdatedFlags {
3249    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
3250}
3251impl Default for HilSensorUpdatedFlags {
3252    fn default() -> Self {
3253        Self::DEFAULT
3254    }
3255}
3256bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
3257impl GimbalManagerCapFlags {
3258    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
3259}
3260impl Default for GimbalManagerCapFlags {
3261    fn default() -> Self {
3262        Self::DEFAULT
3263    }
3264}
3265#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3267#[cfg_attr(feature = "serde", serde(tag = "type"))]
3268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3269#[repr(u32)]
3270#[doc = "Flags to indicate the type of storage."]
3271pub enum StorageType {
3272    #[doc = "Storage type is not known."]
3273    STORAGE_TYPE_UNKNOWN = 0,
3274    #[doc = "Storage type is USB device."]
3275    STORAGE_TYPE_USB_STICK = 1,
3276    #[doc = "Storage type is SD card."]
3277    STORAGE_TYPE_SD = 2,
3278    #[doc = "Storage type is microSD card."]
3279    STORAGE_TYPE_MICROSD = 3,
3280    #[doc = "Storage type is CFast."]
3281    STORAGE_TYPE_CF = 4,
3282    #[doc = "Storage type is CFexpress."]
3283    STORAGE_TYPE_CFE = 5,
3284    #[doc = "Storage type is XQD."]
3285    STORAGE_TYPE_XQD = 6,
3286    #[doc = "Storage type is HD mass storage type."]
3287    STORAGE_TYPE_HD = 7,
3288    #[doc = "Storage type is other, not listed type."]
3289    STORAGE_TYPE_OTHER = 254,
3290}
3291impl StorageType {
3292    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
3293}
3294impl Default for StorageType {
3295    fn default() -> Self {
3296        Self::DEFAULT
3297    }
3298}
3299#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3301#[cfg_attr(feature = "serde", serde(tag = "type"))]
3302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3303#[repr(u32)]
3304#[doc = "Airborne status of UAS."]
3305pub enum UtmFlightState {
3306    #[doc = "The flight state can't be determined."]
3307    UTM_FLIGHT_STATE_UNKNOWN = 1,
3308    #[doc = "UAS on ground."]
3309    UTM_FLIGHT_STATE_GROUND = 2,
3310    #[doc = "UAS airborne."]
3311    UTM_FLIGHT_STATE_AIRBORNE = 3,
3312    #[doc = "UAS is in an emergency flight state."]
3313    UTM_FLIGHT_STATE_EMERGENCY = 16,
3314    #[doc = "UAS has no active controls."]
3315    UTM_FLIGHT_STATE_NOCTRL = 32,
3316}
3317impl UtmFlightState {
3318    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
3319}
3320impl Default for UtmFlightState {
3321    fn default() -> Self {
3322        Self::DEFAULT
3323    }
3324}
3325bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
3326impl MavGeneratorStatusFlag {
3327    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
3328}
3329impl Default for MavGeneratorStatusFlag {
3330    fn default() -> Self {
3331        Self::DEFAULT
3332    }
3333}
3334bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3335impl PositionTargetTypemask {
3336    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3337}
3338impl Default for PositionTargetTypemask {
3339    fn default() -> Self {
3340        Self::DEFAULT
3341    }
3342}
3343#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3345#[cfg_attr(feature = "serde", serde(tag = "type"))]
3346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3347#[repr(u32)]
3348#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
3349pub enum TuneFormat {
3350    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
3351    TUNE_FORMAT_QBASIC1_1 = 1,
3352    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
3353    TUNE_FORMAT_MML_MODERN = 2,
3354}
3355impl TuneFormat {
3356    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
3357}
3358impl Default for TuneFormat {
3359    fn default() -> Self {
3360        Self::DEFAULT
3361    }
3362}
3363#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3365#[cfg_attr(feature = "serde", serde(tag = "type"))]
3366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3367#[repr(u32)]
3368#[doc = "Camera tracking modes"]
3369pub enum CameraTrackingMode {
3370    #[doc = "Not tracking"]
3371    CAMERA_TRACKING_MODE_NONE = 0,
3372    #[doc = "Target is a point"]
3373    CAMERA_TRACKING_MODE_POINT = 1,
3374    #[doc = "Target is a rectangle"]
3375    CAMERA_TRACKING_MODE_RECTANGLE = 2,
3376}
3377impl CameraTrackingMode {
3378    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
3379}
3380impl Default for CameraTrackingMode {
3381    fn default() -> Self {
3382        Self::DEFAULT
3383    }
3384}
3385bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
3386impl IlluminatorErrorFlags {
3387    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
3388}
3389impl Default for IlluminatorErrorFlags {
3390    fn default() -> Self {
3391        Self::DEFAULT
3392    }
3393}
3394#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3396#[cfg_attr(feature = "serde", serde(tag = "type"))]
3397#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3398#[repr(u32)]
3399#[doc = "Enumeration of battery types"]
3400pub enum MavBatteryType {
3401    #[doc = "Not specified."]
3402    MAV_BATTERY_TYPE_UNKNOWN = 0,
3403    #[doc = "Lithium polymer battery"]
3404    MAV_BATTERY_TYPE_LIPO = 1,
3405    #[doc = "Lithium-iron-phosphate battery"]
3406    MAV_BATTERY_TYPE_LIFE = 2,
3407    #[doc = "Lithium-ION battery"]
3408    MAV_BATTERY_TYPE_LION = 3,
3409    #[doc = "Nickel metal hydride battery"]
3410    MAV_BATTERY_TYPE_NIMH = 4,
3411}
3412impl MavBatteryType {
3413    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
3414}
3415impl Default for MavBatteryType {
3416    fn default() -> Self {
3417        Self::DEFAULT
3418    }
3419}
3420#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3422#[cfg_attr(feature = "serde", serde(tag = "type"))]
3423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3424#[repr(u32)]
3425#[doc = "Indicates the ESC connection type."]
3426pub enum EscConnectionType {
3427    #[doc = "Traditional PPM ESC."]
3428    ESC_CONNECTION_TYPE_PPM = 0,
3429    #[doc = "Serial Bus connected ESC."]
3430    ESC_CONNECTION_TYPE_SERIAL = 1,
3431    #[doc = "One Shot PPM ESC."]
3432    ESC_CONNECTION_TYPE_ONESHOT = 2,
3433    #[doc = "I2C ESC."]
3434    ESC_CONNECTION_TYPE_I2C = 3,
3435    #[doc = "CAN-Bus ESC."]
3436    ESC_CONNECTION_TYPE_CAN = 4,
3437    #[doc = "DShot ESC."]
3438    ESC_CONNECTION_TYPE_DSHOT = 5,
3439}
3440impl EscConnectionType {
3441    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
3442}
3443impl Default for EscConnectionType {
3444    fn default() -> Self {
3445        Self::DEFAULT
3446    }
3447}
3448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3450#[cfg_attr(feature = "serde", serde(tag = "type"))]
3451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3452#[repr(u32)]
3453#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
3454pub enum RcSubType {
3455    #[doc = "Spektrum DSM2"]
3456    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
3457    #[doc = "Spektrum DSMX"]
3458    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
3459    #[doc = "Spektrum DSMX8"]
3460    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
3461}
3462impl RcSubType {
3463    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
3464}
3465impl Default for RcSubType {
3466    fn default() -> Self {
3467        Self::DEFAULT
3468    }
3469}
3470#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3471#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3472#[cfg_attr(feature = "serde", serde(tag = "type"))]
3473#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3474#[repr(u32)]
3475#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3476pub enum PreflightStorageMissionAction {
3477    #[doc = "Read current mission data from persistent storage"]
3478    MISSION_READ_PERSISTENT = 0,
3479    #[doc = "Write current mission data to persistent storage"]
3480    MISSION_WRITE_PERSISTENT = 1,
3481    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
3482    MISSION_RESET_DEFAULT = 2,
3483}
3484impl PreflightStorageMissionAction {
3485    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
3486}
3487impl Default for PreflightStorageMissionAction {
3488    fn default() -> Self {
3489        Self::DEFAULT
3490    }
3491}
3492#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3494#[cfg_attr(feature = "serde", serde(tag = "type"))]
3495#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3496#[repr(u32)]
3497pub enum MavOdidHorAcc {
3498    #[doc = "The horizontal accuracy is unknown."]
3499    MAV_ODID_HOR_ACC_UNKNOWN = 0,
3500    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
3501    MAV_ODID_HOR_ACC_10NM = 1,
3502    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
3503    MAV_ODID_HOR_ACC_4NM = 2,
3504    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
3505    MAV_ODID_HOR_ACC_2NM = 3,
3506    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
3507    MAV_ODID_HOR_ACC_1NM = 4,
3508    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
3509    MAV_ODID_HOR_ACC_0_5NM = 5,
3510    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
3511    MAV_ODID_HOR_ACC_0_3NM = 6,
3512    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
3513    MAV_ODID_HOR_ACC_0_1NM = 7,
3514    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
3515    MAV_ODID_HOR_ACC_0_05NM = 8,
3516    #[doc = "The horizontal accuracy is smaller than 30 meter."]
3517    MAV_ODID_HOR_ACC_30_METER = 9,
3518    #[doc = "The horizontal accuracy is smaller than 10 meter."]
3519    MAV_ODID_HOR_ACC_10_METER = 10,
3520    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3521    MAV_ODID_HOR_ACC_3_METER = 11,
3522    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3523    MAV_ODID_HOR_ACC_1_METER = 12,
3524}
3525impl MavOdidHorAcc {
3526    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3527}
3528impl Default for MavOdidHorAcc {
3529    fn default() -> Self {
3530        Self::DEFAULT
3531    }
3532}
3533#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3535#[cfg_attr(feature = "serde", serde(tag = "type"))]
3536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3537#[repr(u32)]
3538#[doc = "Direction of VTOL transition"]
3539pub enum VtolTransitionHeading {
3540    #[doc = "Respect the heading configuration of the vehicle."]
3541    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
3542    #[doc = "Use the heading pointing towards the next waypoint."]
3543    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
3544    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
3545    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
3546    #[doc = "Use the specified heading in parameter 4."]
3547    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
3548    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
3549    VTOL_TRANSITION_HEADING_ANY = 4,
3550}
3551impl VtolTransitionHeading {
3552    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
3553}
3554impl Default for VtolTransitionHeading {
3555    fn default() -> Self {
3556        Self::DEFAULT
3557    }
3558}
3559#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3561#[cfg_attr(feature = "serde", serde(tag = "type"))]
3562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3563#[repr(u32)]
3564#[doc = "Camera tracking status flags"]
3565pub enum CameraTrackingStatusFlags {
3566    #[doc = "Camera is not tracking"]
3567    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
3568    #[doc = "Camera is tracking"]
3569    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
3570    #[doc = "Camera tracking in error state"]
3571    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
3572}
3573impl CameraTrackingStatusFlags {
3574    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
3575}
3576impl Default for CameraTrackingStatusFlags {
3577    fn default() -> Self {
3578        Self::DEFAULT
3579    }
3580}
3581#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3582#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3583#[cfg_attr(feature = "serde", serde(tag = "type"))]
3584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3585#[repr(u32)]
3586pub enum MavOdidSpeedAcc {
3587    #[doc = "The speed accuracy is unknown."]
3588    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3589    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3590    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3591    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3592    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3593    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3594    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3595    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3596    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3597}
3598impl MavOdidSpeedAcc {
3599    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3600}
3601impl Default for MavOdidSpeedAcc {
3602    fn default() -> Self {
3603        Self::DEFAULT
3604    }
3605}
3606bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
3607impl GimbalManagerFlags {
3608    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
3609}
3610impl Default for GimbalManagerFlags {
3611    fn default() -> Self {
3612        Self::DEFAULT
3613    }
3614}
3615#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3617#[cfg_attr(feature = "serde", serde(tag = "type"))]
3618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3619#[repr(u32)]
3620#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
3621pub enum FenceType {
3622    #[doc = "Maximum altitude fence"]
3623    FENCE_TYPE_ALT_MAX = 1,
3624    #[doc = "Circle fence"]
3625    FENCE_TYPE_CIRCLE = 2,
3626    #[doc = "Polygon fence"]
3627    FENCE_TYPE_POLYGON = 4,
3628    #[doc = "Minimum altitude fence"]
3629    FENCE_TYPE_ALT_MIN = 8,
3630}
3631impl FenceType {
3632    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
3633}
3634impl Default for FenceType {
3635    fn default() -> Self {
3636        Self::DEFAULT
3637    }
3638}
3639#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3641#[cfg_attr(feature = "serde", serde(tag = "type"))]
3642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3643#[repr(u32)]
3644#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3645pub enum MavParamExtType {
3646    #[doc = "8-bit unsigned integer"]
3647    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3648    #[doc = "8-bit signed integer"]
3649    MAV_PARAM_EXT_TYPE_INT8 = 2,
3650    #[doc = "16-bit unsigned integer"]
3651    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3652    #[doc = "16-bit signed integer"]
3653    MAV_PARAM_EXT_TYPE_INT16 = 4,
3654    #[doc = "32-bit unsigned integer"]
3655    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3656    #[doc = "32-bit signed integer"]
3657    MAV_PARAM_EXT_TYPE_INT32 = 6,
3658    #[doc = "64-bit unsigned integer"]
3659    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3660    #[doc = "64-bit signed integer"]
3661    MAV_PARAM_EXT_TYPE_INT64 = 8,
3662    #[doc = "32-bit floating-point"]
3663    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3664    #[doc = "64-bit floating-point"]
3665    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3666    #[doc = "Custom Type"]
3667    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3668}
3669impl MavParamExtType {
3670    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3671}
3672impl Default for MavParamExtType {
3673    fn default() -> Self {
3674        Self::DEFAULT
3675    }
3676}
3677bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
3678impl HlFailureFlag {
3679    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
3680}
3681impl Default for HlFailureFlag {
3682    fn default() -> Self {
3683        Self::DEFAULT
3684    }
3685}
3686#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3688#[cfg_attr(feature = "serde", serde(tag = "type"))]
3689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3690#[repr(u32)]
3691#[doc = "Camera Modes."]
3692pub enum CameraMode {
3693    #[doc = "Camera is in image/photo capture mode."]
3694    CAMERA_MODE_IMAGE = 0,
3695    #[doc = "Camera is in video capture mode."]
3696    CAMERA_MODE_VIDEO = 1,
3697    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
3698    CAMERA_MODE_IMAGE_SURVEY = 2,
3699}
3700impl CameraMode {
3701    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
3702}
3703impl Default for CameraMode {
3704    fn default() -> Self {
3705        Self::DEFAULT
3706    }
3707}
3708#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3710#[cfg_attr(feature = "serde", serde(tag = "type"))]
3711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3712#[repr(u32)]
3713#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
3714pub enum MavMode {
3715    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
3716    MAV_MODE_PREFLIGHT = 0,
3717    #[doc = "System is allowed to be active, under assisted RC control."]
3718    MAV_MODE_STABILIZE_DISARMED = 80,
3719    #[doc = "System is allowed to be active, under assisted RC control."]
3720    MAV_MODE_STABILIZE_ARMED = 208,
3721    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
3722    MAV_MODE_MANUAL_DISARMED = 64,
3723    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
3724    MAV_MODE_MANUAL_ARMED = 192,
3725    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
3726    MAV_MODE_GUIDED_DISARMED = 88,
3727    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
3728    MAV_MODE_GUIDED_ARMED = 216,
3729    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
3730    MAV_MODE_AUTO_DISARMED = 92,
3731    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
3732    MAV_MODE_AUTO_ARMED = 220,
3733    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
3734    MAV_MODE_TEST_DISARMED = 66,
3735    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
3736    MAV_MODE_TEST_ARMED = 194,
3737}
3738impl MavMode {
3739    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
3740}
3741impl Default for MavMode {
3742    fn default() -> Self {
3743        Self::DEFAULT
3744    }
3745}
3746#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3748#[cfg_attr(feature = "serde", serde(tag = "type"))]
3749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3750#[repr(u32)]
3751pub enum MavOdidVerAcc {
3752    #[doc = "The vertical accuracy is unknown."]
3753    MAV_ODID_VER_ACC_UNKNOWN = 0,
3754    #[doc = "The vertical accuracy is smaller than 150 meter."]
3755    MAV_ODID_VER_ACC_150_METER = 1,
3756    #[doc = "The vertical accuracy is smaller than 45 meter."]
3757    MAV_ODID_VER_ACC_45_METER = 2,
3758    #[doc = "The vertical accuracy is smaller than 25 meter."]
3759    MAV_ODID_VER_ACC_25_METER = 3,
3760    #[doc = "The vertical accuracy is smaller than 10 meter."]
3761    MAV_ODID_VER_ACC_10_METER = 4,
3762    #[doc = "The vertical accuracy is smaller than 3 meter."]
3763    MAV_ODID_VER_ACC_3_METER = 5,
3764    #[doc = "The vertical accuracy is smaller than 1 meter."]
3765    MAV_ODID_VER_ACC_1_METER = 6,
3766}
3767impl MavOdidVerAcc {
3768    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3769}
3770impl Default for MavOdidVerAcc {
3771    fn default() -> Self {
3772        Self::DEFAULT
3773    }
3774}
3775#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3776#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3777#[cfg_attr(feature = "serde", serde(tag = "type"))]
3778#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3779#[repr(u32)]
3780#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3781pub enum MotorTestThrottleType {
3782    #[doc = "Throttle as a percentage (0 ~ 100)"]
3783    MOTOR_TEST_THROTTLE_PERCENT = 0,
3784    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3785    MOTOR_TEST_THROTTLE_PWM = 1,
3786    #[doc = "Throttle pass-through from pilot's transmitter."]
3787    MOTOR_TEST_THROTTLE_PILOT = 2,
3788    #[doc = "Per-motor compass calibration test."]
3789    MOTOR_TEST_COMPASS_CAL = 3,
3790}
3791impl MotorTestThrottleType {
3792    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3793}
3794impl Default for MotorTestThrottleType {
3795    fn default() -> Self {
3796        Self::DEFAULT
3797    }
3798}
3799#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3801#[cfg_attr(feature = "serde", serde(tag = "type"))]
3802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3803#[repr(u32)]
3804#[doc = "Result from PARAM_EXT_SET message."]
3805pub enum ParamAck {
3806    #[doc = "Parameter value ACCEPTED and SET"]
3807    PARAM_ACK_ACCEPTED = 0,
3808    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3809    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3810    #[doc = "Parameter failed to set"]
3811    PARAM_ACK_FAILED = 2,
3812    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3813    PARAM_ACK_IN_PROGRESS = 3,
3814}
3815impl ParamAck {
3816    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3817}
3818impl Default for ParamAck {
3819    fn default() -> Self {
3820        Self::DEFAULT
3821    }
3822}
3823#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3825#[cfg_attr(feature = "serde", serde(tag = "type"))]
3826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3827#[repr(u32)]
3828#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
3829pub enum MavModeFlagDecodePosition {
3830    #[doc = "First bit:  10000000"]
3831    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
3832    #[doc = "Second bit: 01000000"]
3833    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
3834    #[doc = "Third bit:  00100000"]
3835    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
3836    #[doc = "Fourth bit: 00010000"]
3837    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
3838    #[doc = "Fifth bit:  00001000"]
3839    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
3840    #[doc = "Sixth bit:   00000100"]
3841    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
3842    #[doc = "Seventh bit: 00000010"]
3843    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
3844    #[doc = "Eighth bit: 00000001"]
3845    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
3846}
3847impl MavModeFlagDecodePosition {
3848    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
3849}
3850impl Default for MavModeFlagDecodePosition {
3851    fn default() -> Self {
3852        Self::DEFAULT
3853    }
3854}
3855#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3857#[cfg_attr(feature = "serde", serde(tag = "type"))]
3858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3859#[repr(u32)]
3860pub enum MavState {
3861    #[doc = "Uninitialized system, state is unknown."]
3862    MAV_STATE_UNINIT = 0,
3863    #[doc = "System is booting up."]
3864    MAV_STATE_BOOT = 1,
3865    #[doc = "System is calibrating and not flight-ready."]
3866    MAV_STATE_CALIBRATING = 2,
3867    #[doc = "System is grounded and on standby. It can be launched any time."]
3868    MAV_STATE_STANDBY = 3,
3869    #[doc = "System is active and might be already airborne. Motors are engaged."]
3870    MAV_STATE_ACTIVE = 4,
3871    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3872    MAV_STATE_CRITICAL = 5,
3873    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3874    MAV_STATE_EMERGENCY = 6,
3875    #[doc = "System just initialized its power-down sequence, will shut down now."]
3876    MAV_STATE_POWEROFF = 7,
3877    #[doc = "System is terminating itself (failsafe or commanded)."]
3878    MAV_STATE_FLIGHT_TERMINATION = 8,
3879}
3880impl MavState {
3881    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3882}
3883impl Default for MavState {
3884    fn default() -> Self {
3885        Self::DEFAULT
3886    }
3887}
3888#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3890#[cfg_attr(feature = "serde", serde(tag = "type"))]
3891#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3892#[repr(u32)]
3893#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
3894pub enum MavMountMode {
3895    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
3896    MAV_MOUNT_MODE_RETRACT = 0,
3897    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
3898    MAV_MOUNT_MODE_NEUTRAL = 1,
3899    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
3900    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
3901    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
3902    MAV_MOUNT_MODE_RC_TARGETING = 3,
3903    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
3904    MAV_MOUNT_MODE_GPS_POINT = 4,
3905    #[doc = "Gimbal tracks system with specified system ID"]
3906    MAV_MOUNT_MODE_SYSID_TARGET = 5,
3907    #[doc = "Gimbal tracks home position"]
3908    MAV_MOUNT_MODE_HOME_LOCATION = 6,
3909}
3910impl MavMountMode {
3911    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
3912}
3913impl Default for MavMountMode {
3914    fn default() -> Self {
3915        Self::DEFAULT
3916    }
3917}
3918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3920#[cfg_attr(feature = "serde", serde(tag = "type"))]
3921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3922#[repr(u32)]
3923pub enum MavOdidArmStatus {
3924    #[doc = "Passing arming checks."]
3925    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
3926    #[doc = "Generic arming failure, see error string for details."]
3927    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
3928}
3929impl MavOdidArmStatus {
3930    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
3931}
3932impl Default for MavOdidArmStatus {
3933    fn default() -> Self {
3934        Self::DEFAULT
3935    }
3936}
3937#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3939#[cfg_attr(feature = "serde", serde(tag = "type"))]
3940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3941#[repr(u32)]
3942#[doc = "Type of landing target"]
3943pub enum LandingTargetType {
3944    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
3945    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
3946    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
3947    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
3948    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
3949    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
3950    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
3951    LANDING_TARGET_TYPE_VISION_OTHER = 3,
3952}
3953impl LandingTargetType {
3954    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
3955}
3956impl Default for LandingTargetType {
3957    fn default() -> Self {
3958        Self::DEFAULT
3959    }
3960}
3961#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3963#[cfg_attr(feature = "serde", serde(tag = "type"))]
3964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3965#[repr(u32)]
3966#[doc = "SERIAL_CONTROL device types"]
3967pub enum SerialControlDev {
3968    #[doc = "First telemetry port"]
3969    SERIAL_CONTROL_DEV_TELEM1 = 0,
3970    #[doc = "Second telemetry port"]
3971    SERIAL_CONTROL_DEV_TELEM2 = 1,
3972    #[doc = "First GPS port"]
3973    SERIAL_CONTROL_DEV_GPS1 = 2,
3974    #[doc = "Second GPS port"]
3975    SERIAL_CONTROL_DEV_GPS2 = 3,
3976    #[doc = "system shell"]
3977    SERIAL_CONTROL_DEV_SHELL = 10,
3978    #[doc = "SERIAL0"]
3979    SERIAL_CONTROL_SERIAL0 = 100,
3980    #[doc = "SERIAL1"]
3981    SERIAL_CONTROL_SERIAL1 = 101,
3982    #[doc = "SERIAL2"]
3983    SERIAL_CONTROL_SERIAL2 = 102,
3984    #[doc = "SERIAL3"]
3985    SERIAL_CONTROL_SERIAL3 = 103,
3986    #[doc = "SERIAL4"]
3987    SERIAL_CONTROL_SERIAL4 = 104,
3988    #[doc = "SERIAL5"]
3989    SERIAL_CONTROL_SERIAL5 = 105,
3990    #[doc = "SERIAL6"]
3991    SERIAL_CONTROL_SERIAL6 = 106,
3992    #[doc = "SERIAL7"]
3993    SERIAL_CONTROL_SERIAL7 = 107,
3994    #[doc = "SERIAL8"]
3995    SERIAL_CONTROL_SERIAL8 = 108,
3996    #[doc = "SERIAL9"]
3997    SERIAL_CONTROL_SERIAL9 = 109,
3998}
3999impl SerialControlDev {
4000    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4001}
4002impl Default for SerialControlDev {
4003    fn default() -> Self {
4004        Self::DEFAULT
4005    }
4006}
4007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4009#[cfg_attr(feature = "serde", serde(tag = "type"))]
4010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4011#[repr(u32)]
4012#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
4013pub enum MavComponent {
4014    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
4015    MAV_COMP_ID_ALL = 0,
4016    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
4017    MAV_COMP_ID_AUTOPILOT1 = 1,
4018    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4019    MAV_COMP_ID_USER1 = 25,
4020    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4021    MAV_COMP_ID_USER2 = 26,
4022    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4023    MAV_COMP_ID_USER3 = 27,
4024    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4025    MAV_COMP_ID_USER4 = 28,
4026    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4027    MAV_COMP_ID_USER5 = 29,
4028    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4029    MAV_COMP_ID_USER6 = 30,
4030    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4031    MAV_COMP_ID_USER7 = 31,
4032    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4033    MAV_COMP_ID_USER8 = 32,
4034    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4035    MAV_COMP_ID_USER9 = 33,
4036    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4037    MAV_COMP_ID_USER10 = 34,
4038    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4039    MAV_COMP_ID_USER11 = 35,
4040    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4041    MAV_COMP_ID_USER12 = 36,
4042    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4043    MAV_COMP_ID_USER13 = 37,
4044    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4045    MAV_COMP_ID_USER14 = 38,
4046    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4047    MAV_COMP_ID_USER15 = 39,
4048    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4049    MAV_COMP_ID_USER16 = 40,
4050    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4051    MAV_COMP_ID_USER17 = 41,
4052    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4053    MAV_COMP_ID_USER18 = 42,
4054    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4055    MAV_COMP_ID_USER19 = 43,
4056    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4057    MAV_COMP_ID_USER20 = 44,
4058    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4059    MAV_COMP_ID_USER21 = 45,
4060    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4061    MAV_COMP_ID_USER22 = 46,
4062    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4063    MAV_COMP_ID_USER23 = 47,
4064    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4065    MAV_COMP_ID_USER24 = 48,
4066    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4067    MAV_COMP_ID_USER25 = 49,
4068    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4069    MAV_COMP_ID_USER26 = 50,
4070    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4071    MAV_COMP_ID_USER27 = 51,
4072    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4073    MAV_COMP_ID_USER28 = 52,
4074    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4075    MAV_COMP_ID_USER29 = 53,
4076    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4077    MAV_COMP_ID_USER30 = 54,
4078    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4079    MAV_COMP_ID_USER31 = 55,
4080    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4081    MAV_COMP_ID_USER32 = 56,
4082    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4083    MAV_COMP_ID_USER33 = 57,
4084    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4085    MAV_COMP_ID_USER34 = 58,
4086    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4087    MAV_COMP_ID_USER35 = 59,
4088    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4089    MAV_COMP_ID_USER36 = 60,
4090    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4091    MAV_COMP_ID_USER37 = 61,
4092    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4093    MAV_COMP_ID_USER38 = 62,
4094    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4095    MAV_COMP_ID_USER39 = 63,
4096    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4097    MAV_COMP_ID_USER40 = 64,
4098    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4099    MAV_COMP_ID_USER41 = 65,
4100    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4101    MAV_COMP_ID_USER42 = 66,
4102    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4103    MAV_COMP_ID_USER43 = 67,
4104    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
4105    MAV_COMP_ID_TELEMETRY_RADIO = 68,
4106    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4107    MAV_COMP_ID_USER45 = 69,
4108    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4109    MAV_COMP_ID_USER46 = 70,
4110    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4111    MAV_COMP_ID_USER47 = 71,
4112    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4113    MAV_COMP_ID_USER48 = 72,
4114    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4115    MAV_COMP_ID_USER49 = 73,
4116    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4117    MAV_COMP_ID_USER50 = 74,
4118    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4119    MAV_COMP_ID_USER51 = 75,
4120    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4121    MAV_COMP_ID_USER52 = 76,
4122    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4123    MAV_COMP_ID_USER53 = 77,
4124    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4125    MAV_COMP_ID_USER54 = 78,
4126    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4127    MAV_COMP_ID_USER55 = 79,
4128    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4129    MAV_COMP_ID_USER56 = 80,
4130    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4131    MAV_COMP_ID_USER57 = 81,
4132    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4133    MAV_COMP_ID_USER58 = 82,
4134    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4135    MAV_COMP_ID_USER59 = 83,
4136    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4137    MAV_COMP_ID_USER60 = 84,
4138    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4139    MAV_COMP_ID_USER61 = 85,
4140    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4141    MAV_COMP_ID_USER62 = 86,
4142    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4143    MAV_COMP_ID_USER63 = 87,
4144    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4145    MAV_COMP_ID_USER64 = 88,
4146    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4147    MAV_COMP_ID_USER65 = 89,
4148    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4149    MAV_COMP_ID_USER66 = 90,
4150    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4151    MAV_COMP_ID_USER67 = 91,
4152    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4153    MAV_COMP_ID_USER68 = 92,
4154    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4155    MAV_COMP_ID_USER69 = 93,
4156    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4157    MAV_COMP_ID_USER70 = 94,
4158    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4159    MAV_COMP_ID_USER71 = 95,
4160    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4161    MAV_COMP_ID_USER72 = 96,
4162    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4163    MAV_COMP_ID_USER73 = 97,
4164    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4165    MAV_COMP_ID_USER74 = 98,
4166    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
4167    MAV_COMP_ID_USER75 = 99,
4168    #[doc = "Camera #1."]
4169    MAV_COMP_ID_CAMERA = 100,
4170    #[doc = "Camera #2."]
4171    MAV_COMP_ID_CAMERA2 = 101,
4172    #[doc = "Camera #3."]
4173    MAV_COMP_ID_CAMERA3 = 102,
4174    #[doc = "Camera #4."]
4175    MAV_COMP_ID_CAMERA4 = 103,
4176    #[doc = "Camera #5."]
4177    MAV_COMP_ID_CAMERA5 = 104,
4178    #[doc = "Camera #6."]
4179    MAV_COMP_ID_CAMERA6 = 105,
4180    #[doc = "Servo #1."]
4181    MAV_COMP_ID_SERVO1 = 140,
4182    #[doc = "Servo #2."]
4183    MAV_COMP_ID_SERVO2 = 141,
4184    #[doc = "Servo #3."]
4185    MAV_COMP_ID_SERVO3 = 142,
4186    #[doc = "Servo #4."]
4187    MAV_COMP_ID_SERVO4 = 143,
4188    #[doc = "Servo #5."]
4189    MAV_COMP_ID_SERVO5 = 144,
4190    #[doc = "Servo #6."]
4191    MAV_COMP_ID_SERVO6 = 145,
4192    #[doc = "Servo #7."]
4193    MAV_COMP_ID_SERVO7 = 146,
4194    #[doc = "Servo #8."]
4195    MAV_COMP_ID_SERVO8 = 147,
4196    #[doc = "Servo #9."]
4197    MAV_COMP_ID_SERVO9 = 148,
4198    #[doc = "Servo #10."]
4199    MAV_COMP_ID_SERVO10 = 149,
4200    #[doc = "Servo #11."]
4201    MAV_COMP_ID_SERVO11 = 150,
4202    #[doc = "Servo #12."]
4203    MAV_COMP_ID_SERVO12 = 151,
4204    #[doc = "Servo #13."]
4205    MAV_COMP_ID_SERVO13 = 152,
4206    #[doc = "Servo #14."]
4207    MAV_COMP_ID_SERVO14 = 153,
4208    #[doc = "Gimbal #1."]
4209    MAV_COMP_ID_GIMBAL = 154,
4210    #[doc = "Logging component."]
4211    MAV_COMP_ID_LOG = 155,
4212    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
4213    MAV_COMP_ID_ADSB = 156,
4214    #[doc = "On Screen Display (OSD) devices for video links."]
4215    MAV_COMP_ID_OSD = 157,
4216    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
4217    MAV_COMP_ID_PERIPHERAL = 158,
4218    #[doc = "Gimbal ID for QX1."]
4219    MAV_COMP_ID_QX1_GIMBAL = 159,
4220    #[doc = "FLARM collision alert component."]
4221    MAV_COMP_ID_FLARM = 160,
4222    #[doc = "Parachute component."]
4223    MAV_COMP_ID_PARACHUTE = 161,
4224    #[doc = "Winch component."]
4225    MAV_COMP_ID_WINCH = 169,
4226    #[doc = "Gimbal #2."]
4227    MAV_COMP_ID_GIMBAL2 = 171,
4228    #[doc = "Gimbal #3."]
4229    MAV_COMP_ID_GIMBAL3 = 172,
4230    #[doc = "Gimbal #4"]
4231    MAV_COMP_ID_GIMBAL4 = 173,
4232    #[doc = "Gimbal #5."]
4233    MAV_COMP_ID_GIMBAL5 = 174,
4234    #[doc = "Gimbal #6."]
4235    MAV_COMP_ID_GIMBAL6 = 175,
4236    #[doc = "Battery #1."]
4237    MAV_COMP_ID_BATTERY = 180,
4238    #[doc = "Battery #2."]
4239    MAV_COMP_ID_BATTERY2 = 181,
4240    #[doc = "CAN over MAVLink client."]
4241    MAV_COMP_ID_MAVCAN = 189,
4242    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
4243    MAV_COMP_ID_MISSIONPLANNER = 190,
4244    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
4245    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
4246    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
4247    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
4248    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
4249    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
4250    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
4251    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
4252    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
4253    MAV_COMP_ID_PATHPLANNER = 195,
4254    #[doc = "Component that plans a collision free path between two points."]
4255    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
4256    #[doc = "Component that provides position estimates using VIO techniques."]
4257    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
4258    #[doc = "Component that manages pairing of vehicle and GCS."]
4259    MAV_COMP_ID_PAIRING_MANAGER = 198,
4260    #[doc = "Inertial Measurement Unit (IMU) #1."]
4261    MAV_COMP_ID_IMU = 200,
4262    #[doc = "Inertial Measurement Unit (IMU) #2."]
4263    MAV_COMP_ID_IMU_2 = 201,
4264    #[doc = "Inertial Measurement Unit (IMU) #3."]
4265    MAV_COMP_ID_IMU_3 = 202,
4266    #[doc = "GPS #1."]
4267    MAV_COMP_ID_GPS = 220,
4268    #[doc = "GPS #2."]
4269    MAV_COMP_ID_GPS2 = 221,
4270    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
4271    MAV_COMP_ID_ODID_TXRX_1 = 236,
4272    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
4273    MAV_COMP_ID_ODID_TXRX_2 = 237,
4274    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
4275    MAV_COMP_ID_ODID_TXRX_3 = 238,
4276    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
4277    MAV_COMP_ID_UDP_BRIDGE = 240,
4278    #[doc = "Component to bridge to UART (i.e. from UDP)."]
4279    MAV_COMP_ID_UART_BRIDGE = 241,
4280    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
4281    MAV_COMP_ID_TUNNEL_NODE = 242,
4282    #[doc = "Illuminator"]
4283    MAV_COMP_ID_ILLUMINATOR = 243,
4284    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
4285    MAV_COMP_ID_SYSTEM_CONTROL = 250,
4286}
4287impl MavComponent {
4288    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
4289}
4290impl Default for MavComponent {
4291    fn default() -> Self {
4292        Self::DEFAULT
4293    }
4294}
4295#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4297#[cfg_attr(feature = "serde", serde(tag = "type"))]
4298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4299#[repr(u32)]
4300#[doc = "Enumeration of the ADSB altimeter types"]
4301pub enum AdsbAltitudeType {
4302    #[doc = "Altitude reported from a Baro source using QNH reference"]
4303    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
4304    #[doc = "Altitude reported from a GNSS source"]
4305    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
4306}
4307impl AdsbAltitudeType {
4308    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
4309}
4310impl Default for AdsbAltitudeType {
4311    fn default() -> Self {
4312        Self::DEFAULT
4313    }
4314}
4315#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4317#[cfg_attr(feature = "serde", serde(tag = "type"))]
4318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4319#[repr(u32)]
4320#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
4321pub enum MavDoRepositionFlags {
4322    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
4323    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
4324}
4325impl MavDoRepositionFlags {
4326    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
4327}
4328impl Default for MavDoRepositionFlags {
4329    fn default() -> Self {
4330        Self::DEFAULT
4331    }
4332}
4333#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4335#[cfg_attr(feature = "serde", serde(tag = "type"))]
4336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4337#[repr(u32)]
4338#[doc = "Source of information about this collision."]
4339pub enum MavCollisionSrc {
4340    #[doc = "ID field references ADSB_VEHICLE packets"]
4341    MAV_COLLISION_SRC_ADSB = 0,
4342    #[doc = "ID field references MAVLink SRC ID"]
4343    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
4344}
4345impl MavCollisionSrc {
4346    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
4347}
4348impl Default for MavCollisionSrc {
4349    fn default() -> Self {
4350        Self::DEFAULT
4351    }
4352}
4353bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
4354impl CameraCapFlags {
4355    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
4356}
4357impl Default for CameraCapFlags {
4358    fn default() -> Self {
4359        Self::DEFAULT
4360    }
4361}
4362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4364#[cfg_attr(feature = "serde", serde(tag = "type"))]
4365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4366#[repr(u32)]
4367#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
4368pub enum MavFtpErr {
4369    #[doc = "None: No error"]
4370    MAV_FTP_ERR_NONE = 0,
4371    #[doc = "Fail: Unknown failure"]
4372    MAV_FTP_ERR_FAIL = 1,
4373    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
4374    MAV_FTP_ERR_FAILERRNO = 2,
4375    #[doc = "InvalidDataSize: Payload size is invalid"]
4376    MAV_FTP_ERR_INVALIDDATASIZE = 3,
4377    #[doc = "InvalidSession: Session is not currently open"]
4378    MAV_FTP_ERR_INVALIDSESSION = 4,
4379    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
4380    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
4381    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
4382    MAV_FTP_ERR_EOF = 6,
4383    #[doc = "UnknownCommand: Unknown command / opcode"]
4384    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
4385    #[doc = "FileExists: File/directory already exists"]
4386    MAV_FTP_ERR_FILEEXISTS = 8,
4387    #[doc = "FileProtected: File/directory is write protected"]
4388    MAV_FTP_ERR_FILEPROTECTED = 9,
4389    #[doc = "FileNotFound: File/directory not found"]
4390    MAV_FTP_ERR_FILENOTFOUND = 10,
4391}
4392impl MavFtpErr {
4393    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
4394}
4395impl Default for MavFtpErr {
4396    fn default() -> Self {
4397        Self::DEFAULT
4398    }
4399}
4400#[doc = "id: 93"]
4401#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
4402#[derive(Debug, Clone, PartialEq)]
4403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4405pub struct HIL_ACTUATOR_CONTROLS_DATA {
4406    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4407    pub time_usec: u64,
4408    #[doc = "Flags bitmask."]
4409    pub flags: HilActuatorControlsFlags,
4410    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
4411    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4412    pub controls: [f32; 16],
4413    #[doc = "System mode. Includes arming state."]
4414    pub mode: MavModeFlag,
4415}
4416impl HIL_ACTUATOR_CONTROLS_DATA {
4417    pub const ENCODED_LEN: usize = 81usize;
4418    pub const DEFAULT: Self = Self {
4419        time_usec: 0_u64,
4420        flags: HilActuatorControlsFlags::DEFAULT,
4421        controls: [0.0_f32; 16usize],
4422        mode: MavModeFlag::DEFAULT,
4423    };
4424    #[cfg(feature = "arbitrary")]
4425    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4426        use arbitrary::{Arbitrary, Unstructured};
4427        let mut buf = [0u8; 1024];
4428        rng.fill_bytes(&mut buf);
4429        let mut unstructured = Unstructured::new(&buf);
4430        Self::arbitrary(&mut unstructured).unwrap_or_default()
4431    }
4432}
4433impl Default for HIL_ACTUATOR_CONTROLS_DATA {
4434    fn default() -> Self {
4435        Self::DEFAULT.clone()
4436    }
4437}
4438impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
4439    type Message = MavMessage;
4440    const ID: u32 = 93u32;
4441    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
4442    const EXTRA_CRC: u8 = 47u8;
4443    const ENCODED_LEN: usize = 81usize;
4444    fn deser(
4445        _version: MavlinkVersion,
4446        __input: &[u8],
4447    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4448        let avail_len = __input.len();
4449        let mut payload_buf = [0; Self::ENCODED_LEN];
4450        let mut buf = if avail_len < Self::ENCODED_LEN {
4451            payload_buf[0..avail_len].copy_from_slice(__input);
4452            Bytes::new(&payload_buf)
4453        } else {
4454            Bytes::new(__input)
4455        };
4456        let mut __struct = Self::default();
4457        __struct.time_usec = buf.get_u64_le();
4458        let tmp = buf.get_u64_le();
4459        __struct.flags =
4460            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
4461                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
4462                    flag_type: "HilActuatorControlsFlags",
4463                    value: tmp as u32,
4464                })?;
4465        for v in &mut __struct.controls {
4466            let val = buf.get_f32_le();
4467            *v = val;
4468        }
4469        let tmp = buf.get_u8();
4470        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
4471            ::mavlink_core::error::ParserError::InvalidFlag {
4472                flag_type: "MavModeFlag",
4473                value: tmp as u32,
4474            },
4475        )?;
4476        Ok(__struct)
4477    }
4478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4479        let mut __tmp = BytesMut::new(bytes);
4480        #[allow(clippy::absurd_extreme_comparisons)]
4481        #[allow(unused_comparisons)]
4482        if __tmp.remaining() < Self::ENCODED_LEN {
4483            panic!(
4484                "buffer is too small (need {} bytes, but got {})",
4485                Self::ENCODED_LEN,
4486                __tmp.remaining(),
4487            )
4488        }
4489        __tmp.put_u64_le(self.time_usec);
4490        __tmp.put_u64_le(self.flags.bits());
4491        for val in &self.controls {
4492            __tmp.put_f32_le(*val);
4493        }
4494        __tmp.put_u8(self.mode.bits());
4495        if matches!(version, MavlinkVersion::V2) {
4496            let len = __tmp.len();
4497            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4498        } else {
4499            __tmp.len()
4500        }
4501    }
4502}
4503#[doc = "id: 387"]
4504#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
4505#[derive(Debug, Clone, PartialEq)]
4506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4508pub struct CANFD_FRAME_DATA {
4509    #[doc = "Frame ID"]
4510    pub id: u32,
4511    #[doc = "System ID."]
4512    pub target_system: u8,
4513    #[doc = "Component ID."]
4514    pub target_component: u8,
4515    #[doc = "bus number"]
4516    pub bus: u8,
4517    #[doc = "Frame length"]
4518    pub len: u8,
4519    #[doc = "Frame data"]
4520    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4521    pub data: [u8; 64],
4522}
4523impl CANFD_FRAME_DATA {
4524    pub const ENCODED_LEN: usize = 72usize;
4525    pub const DEFAULT: Self = Self {
4526        id: 0_u32,
4527        target_system: 0_u8,
4528        target_component: 0_u8,
4529        bus: 0_u8,
4530        len: 0_u8,
4531        data: [0_u8; 64usize],
4532    };
4533    #[cfg(feature = "arbitrary")]
4534    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4535        use arbitrary::{Arbitrary, Unstructured};
4536        let mut buf = [0u8; 1024];
4537        rng.fill_bytes(&mut buf);
4538        let mut unstructured = Unstructured::new(&buf);
4539        Self::arbitrary(&mut unstructured).unwrap_or_default()
4540    }
4541}
4542impl Default for CANFD_FRAME_DATA {
4543    fn default() -> Self {
4544        Self::DEFAULT.clone()
4545    }
4546}
4547impl MessageData for CANFD_FRAME_DATA {
4548    type Message = MavMessage;
4549    const ID: u32 = 387u32;
4550    const NAME: &'static str = "CANFD_FRAME";
4551    const EXTRA_CRC: u8 = 4u8;
4552    const ENCODED_LEN: usize = 72usize;
4553    fn deser(
4554        _version: MavlinkVersion,
4555        __input: &[u8],
4556    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4557        let avail_len = __input.len();
4558        let mut payload_buf = [0; Self::ENCODED_LEN];
4559        let mut buf = if avail_len < Self::ENCODED_LEN {
4560            payload_buf[0..avail_len].copy_from_slice(__input);
4561            Bytes::new(&payload_buf)
4562        } else {
4563            Bytes::new(__input)
4564        };
4565        let mut __struct = Self::default();
4566        __struct.id = buf.get_u32_le();
4567        __struct.target_system = buf.get_u8();
4568        __struct.target_component = buf.get_u8();
4569        __struct.bus = buf.get_u8();
4570        __struct.len = buf.get_u8();
4571        for v in &mut __struct.data {
4572            let val = buf.get_u8();
4573            *v = val;
4574        }
4575        Ok(__struct)
4576    }
4577    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4578        let mut __tmp = BytesMut::new(bytes);
4579        #[allow(clippy::absurd_extreme_comparisons)]
4580        #[allow(unused_comparisons)]
4581        if __tmp.remaining() < Self::ENCODED_LEN {
4582            panic!(
4583                "buffer is too small (need {} bytes, but got {})",
4584                Self::ENCODED_LEN,
4585                __tmp.remaining(),
4586            )
4587        }
4588        __tmp.put_u32_le(self.id);
4589        __tmp.put_u8(self.target_system);
4590        __tmp.put_u8(self.target_component);
4591        __tmp.put_u8(self.bus);
4592        __tmp.put_u8(self.len);
4593        for val in &self.data {
4594            __tmp.put_u8(*val);
4595        }
4596        if matches!(version, MavlinkVersion::V2) {
4597            let len = __tmp.len();
4598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4599        } else {
4600            __tmp.len()
4601        }
4602    }
4603}
4604#[doc = "id: 249"]
4605#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
4606#[derive(Debug, Clone, PartialEq)]
4607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4609pub struct MEMORY_VECT_DATA {
4610    #[doc = "Starting address of the debug variables"]
4611    pub address: u16,
4612    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
4613    pub ver: u8,
4614    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
4615    pub mavtype: u8,
4616    #[doc = "Memory contents at specified address"]
4617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4618    pub value: [i8; 32],
4619}
4620impl MEMORY_VECT_DATA {
4621    pub const ENCODED_LEN: usize = 36usize;
4622    pub const DEFAULT: Self = Self {
4623        address: 0_u16,
4624        ver: 0_u8,
4625        mavtype: 0_u8,
4626        value: [0_i8; 32usize],
4627    };
4628    #[cfg(feature = "arbitrary")]
4629    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4630        use arbitrary::{Arbitrary, Unstructured};
4631        let mut buf = [0u8; 1024];
4632        rng.fill_bytes(&mut buf);
4633        let mut unstructured = Unstructured::new(&buf);
4634        Self::arbitrary(&mut unstructured).unwrap_or_default()
4635    }
4636}
4637impl Default for MEMORY_VECT_DATA {
4638    fn default() -> Self {
4639        Self::DEFAULT.clone()
4640    }
4641}
4642impl MessageData for MEMORY_VECT_DATA {
4643    type Message = MavMessage;
4644    const ID: u32 = 249u32;
4645    const NAME: &'static str = "MEMORY_VECT";
4646    const EXTRA_CRC: u8 = 204u8;
4647    const ENCODED_LEN: usize = 36usize;
4648    fn deser(
4649        _version: MavlinkVersion,
4650        __input: &[u8],
4651    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4652        let avail_len = __input.len();
4653        let mut payload_buf = [0; Self::ENCODED_LEN];
4654        let mut buf = if avail_len < Self::ENCODED_LEN {
4655            payload_buf[0..avail_len].copy_from_slice(__input);
4656            Bytes::new(&payload_buf)
4657        } else {
4658            Bytes::new(__input)
4659        };
4660        let mut __struct = Self::default();
4661        __struct.address = buf.get_u16_le();
4662        __struct.ver = buf.get_u8();
4663        __struct.mavtype = buf.get_u8();
4664        for v in &mut __struct.value {
4665            let val = buf.get_i8();
4666            *v = val;
4667        }
4668        Ok(__struct)
4669    }
4670    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4671        let mut __tmp = BytesMut::new(bytes);
4672        #[allow(clippy::absurd_extreme_comparisons)]
4673        #[allow(unused_comparisons)]
4674        if __tmp.remaining() < Self::ENCODED_LEN {
4675            panic!(
4676                "buffer is too small (need {} bytes, but got {})",
4677                Self::ENCODED_LEN,
4678                __tmp.remaining(),
4679            )
4680        }
4681        __tmp.put_u16_le(self.address);
4682        __tmp.put_u8(self.ver);
4683        __tmp.put_u8(self.mavtype);
4684        for val in &self.value {
4685            __tmp.put_i8(*val);
4686        }
4687        if matches!(version, MavlinkVersion::V2) {
4688            let len = __tmp.len();
4689            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4690        } else {
4691            __tmp.len()
4692        }
4693    }
4694}
4695#[doc = "id: 192"]
4696#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
4697#[derive(Debug, Clone, PartialEq)]
4698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4700pub struct MAG_CAL_REPORT_DATA {
4701    #[doc = "RMS milligauss residuals."]
4702    pub fitness: f32,
4703    #[doc = "X offset."]
4704    pub ofs_x: f32,
4705    #[doc = "Y offset."]
4706    pub ofs_y: f32,
4707    #[doc = "Z offset."]
4708    pub ofs_z: f32,
4709    #[doc = "X diagonal (matrix 11)."]
4710    pub diag_x: f32,
4711    #[doc = "Y diagonal (matrix 22)."]
4712    pub diag_y: f32,
4713    #[doc = "Z diagonal (matrix 33)."]
4714    pub diag_z: f32,
4715    #[doc = "X off-diagonal (matrix 12 and 21)."]
4716    pub offdiag_x: f32,
4717    #[doc = "Y off-diagonal (matrix 13 and 31)."]
4718    pub offdiag_y: f32,
4719    #[doc = "Z off-diagonal (matrix 32 and 23)."]
4720    pub offdiag_z: f32,
4721    #[doc = "Compass being calibrated."]
4722    pub compass_id: u8,
4723    #[doc = "Bitmask of compasses being calibrated."]
4724    pub cal_mask: u8,
4725    #[doc = "Calibration Status."]
4726    pub cal_status: MagCalStatus,
4727    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
4728    pub autosaved: u8,
4729    #[doc = "Confidence in orientation (higher is better)."]
4730    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4731    pub orientation_confidence: f32,
4732    #[doc = "orientation before calibration."]
4733    #[cfg_attr(feature = "serde", serde(default))]
4734    pub old_orientation: MavSensorOrientation,
4735    #[doc = "orientation after calibration."]
4736    #[cfg_attr(feature = "serde", serde(default))]
4737    pub new_orientation: MavSensorOrientation,
4738    #[doc = "field radius correction factor"]
4739    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4740    pub scale_factor: f32,
4741}
4742impl MAG_CAL_REPORT_DATA {
4743    pub const ENCODED_LEN: usize = 54usize;
4744    pub const DEFAULT: Self = Self {
4745        fitness: 0.0_f32,
4746        ofs_x: 0.0_f32,
4747        ofs_y: 0.0_f32,
4748        ofs_z: 0.0_f32,
4749        diag_x: 0.0_f32,
4750        diag_y: 0.0_f32,
4751        diag_z: 0.0_f32,
4752        offdiag_x: 0.0_f32,
4753        offdiag_y: 0.0_f32,
4754        offdiag_z: 0.0_f32,
4755        compass_id: 0_u8,
4756        cal_mask: 0_u8,
4757        cal_status: MagCalStatus::DEFAULT,
4758        autosaved: 0_u8,
4759        orientation_confidence: 0.0_f32,
4760        old_orientation: MavSensorOrientation::DEFAULT,
4761        new_orientation: MavSensorOrientation::DEFAULT,
4762        scale_factor: 0.0_f32,
4763    };
4764    #[cfg(feature = "arbitrary")]
4765    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4766        use arbitrary::{Arbitrary, Unstructured};
4767        let mut buf = [0u8; 1024];
4768        rng.fill_bytes(&mut buf);
4769        let mut unstructured = Unstructured::new(&buf);
4770        Self::arbitrary(&mut unstructured).unwrap_or_default()
4771    }
4772}
4773impl Default for MAG_CAL_REPORT_DATA {
4774    fn default() -> Self {
4775        Self::DEFAULT.clone()
4776    }
4777}
4778impl MessageData for MAG_CAL_REPORT_DATA {
4779    type Message = MavMessage;
4780    const ID: u32 = 192u32;
4781    const NAME: &'static str = "MAG_CAL_REPORT";
4782    const EXTRA_CRC: u8 = 36u8;
4783    const ENCODED_LEN: usize = 54usize;
4784    fn deser(
4785        _version: MavlinkVersion,
4786        __input: &[u8],
4787    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4788        let avail_len = __input.len();
4789        let mut payload_buf = [0; Self::ENCODED_LEN];
4790        let mut buf = if avail_len < Self::ENCODED_LEN {
4791            payload_buf[0..avail_len].copy_from_slice(__input);
4792            Bytes::new(&payload_buf)
4793        } else {
4794            Bytes::new(__input)
4795        };
4796        let mut __struct = Self::default();
4797        __struct.fitness = buf.get_f32_le();
4798        __struct.ofs_x = buf.get_f32_le();
4799        __struct.ofs_y = buf.get_f32_le();
4800        __struct.ofs_z = buf.get_f32_le();
4801        __struct.diag_x = buf.get_f32_le();
4802        __struct.diag_y = buf.get_f32_le();
4803        __struct.diag_z = buf.get_f32_le();
4804        __struct.offdiag_x = buf.get_f32_le();
4805        __struct.offdiag_y = buf.get_f32_le();
4806        __struct.offdiag_z = buf.get_f32_le();
4807        __struct.compass_id = buf.get_u8();
4808        __struct.cal_mask = buf.get_u8();
4809        let tmp = buf.get_u8();
4810        __struct.cal_status =
4811            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4812                enum_type: "MagCalStatus",
4813                value: tmp as u32,
4814            })?;
4815        __struct.autosaved = buf.get_u8();
4816        __struct.orientation_confidence = buf.get_f32_le();
4817        let tmp = buf.get_u8();
4818        __struct.old_orientation =
4819            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4820                enum_type: "MavSensorOrientation",
4821                value: tmp as u32,
4822            })?;
4823        let tmp = buf.get_u8();
4824        __struct.new_orientation =
4825            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4826                enum_type: "MavSensorOrientation",
4827                value: tmp as u32,
4828            })?;
4829        __struct.scale_factor = buf.get_f32_le();
4830        Ok(__struct)
4831    }
4832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4833        let mut __tmp = BytesMut::new(bytes);
4834        #[allow(clippy::absurd_extreme_comparisons)]
4835        #[allow(unused_comparisons)]
4836        if __tmp.remaining() < Self::ENCODED_LEN {
4837            panic!(
4838                "buffer is too small (need {} bytes, but got {})",
4839                Self::ENCODED_LEN,
4840                __tmp.remaining(),
4841            )
4842        }
4843        __tmp.put_f32_le(self.fitness);
4844        __tmp.put_f32_le(self.ofs_x);
4845        __tmp.put_f32_le(self.ofs_y);
4846        __tmp.put_f32_le(self.ofs_z);
4847        __tmp.put_f32_le(self.diag_x);
4848        __tmp.put_f32_le(self.diag_y);
4849        __tmp.put_f32_le(self.diag_z);
4850        __tmp.put_f32_le(self.offdiag_x);
4851        __tmp.put_f32_le(self.offdiag_y);
4852        __tmp.put_f32_le(self.offdiag_z);
4853        __tmp.put_u8(self.compass_id);
4854        __tmp.put_u8(self.cal_mask);
4855        __tmp.put_u8(self.cal_status as u8);
4856        __tmp.put_u8(self.autosaved);
4857        __tmp.put_f32_le(self.orientation_confidence);
4858        __tmp.put_u8(self.old_orientation as u8);
4859        __tmp.put_u8(self.new_orientation as u8);
4860        __tmp.put_f32_le(self.scale_factor);
4861        if matches!(version, MavlinkVersion::V2) {
4862            let len = __tmp.len();
4863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4864        } else {
4865            __tmp.len()
4866        }
4867    }
4868}
4869#[doc = "id: 333"]
4870#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
4871#[derive(Debug, Clone, PartialEq)]
4872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4874pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
4875    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4876    pub time_usec: u64,
4877    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
4878    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4879    pub pos_x: [f32; 5],
4880    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
4881    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4882    pub pos_y: [f32; 5],
4883    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
4884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4885    pub pos_z: [f32; 5],
4886    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
4887    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4888    pub delta: [f32; 5],
4889    #[doc = "Yaw. Set to NaN for unchanged"]
4890    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4891    pub pos_yaw: [f32; 5],
4892    #[doc = "Number of valid control points (up-to 5 points are possible)"]
4893    pub valid_points: u8,
4894}
4895impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
4896    pub const ENCODED_LEN: usize = 109usize;
4897    pub const DEFAULT: Self = Self {
4898        time_usec: 0_u64,
4899        pos_x: [0.0_f32; 5usize],
4900        pos_y: [0.0_f32; 5usize],
4901        pos_z: [0.0_f32; 5usize],
4902        delta: [0.0_f32; 5usize],
4903        pos_yaw: [0.0_f32; 5usize],
4904        valid_points: 0_u8,
4905    };
4906    #[cfg(feature = "arbitrary")]
4907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4908        use arbitrary::{Arbitrary, Unstructured};
4909        let mut buf = [0u8; 1024];
4910        rng.fill_bytes(&mut buf);
4911        let mut unstructured = Unstructured::new(&buf);
4912        Self::arbitrary(&mut unstructured).unwrap_or_default()
4913    }
4914}
4915impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
4916    fn default() -> Self {
4917        Self::DEFAULT.clone()
4918    }
4919}
4920impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
4921    type Message = MavMessage;
4922    const ID: u32 = 333u32;
4923    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
4924    const EXTRA_CRC: u8 = 231u8;
4925    const ENCODED_LEN: usize = 109usize;
4926    fn deser(
4927        _version: MavlinkVersion,
4928        __input: &[u8],
4929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4930        let avail_len = __input.len();
4931        let mut payload_buf = [0; Self::ENCODED_LEN];
4932        let mut buf = if avail_len < Self::ENCODED_LEN {
4933            payload_buf[0..avail_len].copy_from_slice(__input);
4934            Bytes::new(&payload_buf)
4935        } else {
4936            Bytes::new(__input)
4937        };
4938        let mut __struct = Self::default();
4939        __struct.time_usec = buf.get_u64_le();
4940        for v in &mut __struct.pos_x {
4941            let val = buf.get_f32_le();
4942            *v = val;
4943        }
4944        for v in &mut __struct.pos_y {
4945            let val = buf.get_f32_le();
4946            *v = val;
4947        }
4948        for v in &mut __struct.pos_z {
4949            let val = buf.get_f32_le();
4950            *v = val;
4951        }
4952        for v in &mut __struct.delta {
4953            let val = buf.get_f32_le();
4954            *v = val;
4955        }
4956        for v in &mut __struct.pos_yaw {
4957            let val = buf.get_f32_le();
4958            *v = val;
4959        }
4960        __struct.valid_points = buf.get_u8();
4961        Ok(__struct)
4962    }
4963    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4964        let mut __tmp = BytesMut::new(bytes);
4965        #[allow(clippy::absurd_extreme_comparisons)]
4966        #[allow(unused_comparisons)]
4967        if __tmp.remaining() < Self::ENCODED_LEN {
4968            panic!(
4969                "buffer is too small (need {} bytes, but got {})",
4970                Self::ENCODED_LEN,
4971                __tmp.remaining(),
4972            )
4973        }
4974        __tmp.put_u64_le(self.time_usec);
4975        for val in &self.pos_x {
4976            __tmp.put_f32_le(*val);
4977        }
4978        for val in &self.pos_y {
4979            __tmp.put_f32_le(*val);
4980        }
4981        for val in &self.pos_z {
4982            __tmp.put_f32_le(*val);
4983        }
4984        for val in &self.delta {
4985            __tmp.put_f32_le(*val);
4986        }
4987        for val in &self.pos_yaw {
4988            __tmp.put_f32_le(*val);
4989        }
4990        __tmp.put_u8(self.valid_points);
4991        if matches!(version, MavlinkVersion::V2) {
4992            let len = __tmp.len();
4993            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4994        } else {
4995            __tmp.len()
4996        }
4997    }
4998}
4999#[doc = "id: 113"]
5000#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
5001#[derive(Debug, Clone, PartialEq)]
5002#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5004pub struct HIL_GPS_DATA {
5005    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5006    pub time_usec: u64,
5007    #[doc = "Latitude (WGS84)"]
5008    pub lat: i32,
5009    #[doc = "Longitude (WGS84)"]
5010    pub lon: i32,
5011    #[doc = "Altitude (MSL). Positive for up."]
5012    pub alt: i32,
5013    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
5014    pub eph: u16,
5015    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
5016    pub epv: u16,
5017    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
5018    pub vel: u16,
5019    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
5020    pub vn: i16,
5021    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
5022    pub ve: i16,
5023    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
5024    pub vd: i16,
5025    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
5026    pub cog: u16,
5027    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
5028    pub fix_type: u8,
5029    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
5030    pub satellites_visible: u8,
5031    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
5032    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5033    pub id: u8,
5034    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
5035    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5036    pub yaw: u16,
5037}
5038impl HIL_GPS_DATA {
5039    pub const ENCODED_LEN: usize = 39usize;
5040    pub const DEFAULT: Self = Self {
5041        time_usec: 0_u64,
5042        lat: 0_i32,
5043        lon: 0_i32,
5044        alt: 0_i32,
5045        eph: 0_u16,
5046        epv: 0_u16,
5047        vel: 0_u16,
5048        vn: 0_i16,
5049        ve: 0_i16,
5050        vd: 0_i16,
5051        cog: 0_u16,
5052        fix_type: 0_u8,
5053        satellites_visible: 0_u8,
5054        id: 0_u8,
5055        yaw: 0_u16,
5056    };
5057    #[cfg(feature = "arbitrary")]
5058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5059        use arbitrary::{Arbitrary, Unstructured};
5060        let mut buf = [0u8; 1024];
5061        rng.fill_bytes(&mut buf);
5062        let mut unstructured = Unstructured::new(&buf);
5063        Self::arbitrary(&mut unstructured).unwrap_or_default()
5064    }
5065}
5066impl Default for HIL_GPS_DATA {
5067    fn default() -> Self {
5068        Self::DEFAULT.clone()
5069    }
5070}
5071impl MessageData for HIL_GPS_DATA {
5072    type Message = MavMessage;
5073    const ID: u32 = 113u32;
5074    const NAME: &'static str = "HIL_GPS";
5075    const EXTRA_CRC: u8 = 124u8;
5076    const ENCODED_LEN: usize = 39usize;
5077    fn deser(
5078        _version: MavlinkVersion,
5079        __input: &[u8],
5080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5081        let avail_len = __input.len();
5082        let mut payload_buf = [0; Self::ENCODED_LEN];
5083        let mut buf = if avail_len < Self::ENCODED_LEN {
5084            payload_buf[0..avail_len].copy_from_slice(__input);
5085            Bytes::new(&payload_buf)
5086        } else {
5087            Bytes::new(__input)
5088        };
5089        let mut __struct = Self::default();
5090        __struct.time_usec = buf.get_u64_le();
5091        __struct.lat = buf.get_i32_le();
5092        __struct.lon = buf.get_i32_le();
5093        __struct.alt = buf.get_i32_le();
5094        __struct.eph = buf.get_u16_le();
5095        __struct.epv = buf.get_u16_le();
5096        __struct.vel = buf.get_u16_le();
5097        __struct.vn = buf.get_i16_le();
5098        __struct.ve = buf.get_i16_le();
5099        __struct.vd = buf.get_i16_le();
5100        __struct.cog = buf.get_u16_le();
5101        __struct.fix_type = buf.get_u8();
5102        __struct.satellites_visible = buf.get_u8();
5103        __struct.id = buf.get_u8();
5104        __struct.yaw = buf.get_u16_le();
5105        Ok(__struct)
5106    }
5107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5108        let mut __tmp = BytesMut::new(bytes);
5109        #[allow(clippy::absurd_extreme_comparisons)]
5110        #[allow(unused_comparisons)]
5111        if __tmp.remaining() < Self::ENCODED_LEN {
5112            panic!(
5113                "buffer is too small (need {} bytes, but got {})",
5114                Self::ENCODED_LEN,
5115                __tmp.remaining(),
5116            )
5117        }
5118        __tmp.put_u64_le(self.time_usec);
5119        __tmp.put_i32_le(self.lat);
5120        __tmp.put_i32_le(self.lon);
5121        __tmp.put_i32_le(self.alt);
5122        __tmp.put_u16_le(self.eph);
5123        __tmp.put_u16_le(self.epv);
5124        __tmp.put_u16_le(self.vel);
5125        __tmp.put_i16_le(self.vn);
5126        __tmp.put_i16_le(self.ve);
5127        __tmp.put_i16_le(self.vd);
5128        __tmp.put_u16_le(self.cog);
5129        __tmp.put_u8(self.fix_type);
5130        __tmp.put_u8(self.satellites_visible);
5131        __tmp.put_u8(self.id);
5132        __tmp.put_u16_le(self.yaw);
5133        if matches!(version, MavlinkVersion::V2) {
5134            let len = __tmp.len();
5135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5136        } else {
5137            __tmp.len()
5138        }
5139    }
5140}
5141#[doc = "id: 336"]
5142#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
5143#[derive(Debug, Clone, PartialEq)]
5144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5146pub struct CELLULAR_CONFIG_DATA {
5147    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
5148    pub enable_lte: u8,
5149    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
5150    pub enable_pin: u8,
5151    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
5152    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5153    pub pin: [u8; 16],
5154    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
5155    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5156    pub new_pin: [u8; 16],
5157    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
5158    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5159    pub apn: [u8; 32],
5160    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
5161    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5162    pub puk: [u8; 16],
5163    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
5164    pub roaming: u8,
5165    #[doc = "Message acceptance response (sent back to GS)."]
5166    pub response: CellularConfigResponse,
5167}
5168impl CELLULAR_CONFIG_DATA {
5169    pub const ENCODED_LEN: usize = 84usize;
5170    pub const DEFAULT: Self = Self {
5171        enable_lte: 0_u8,
5172        enable_pin: 0_u8,
5173        pin: [0_u8; 16usize],
5174        new_pin: [0_u8; 16usize],
5175        apn: [0_u8; 32usize],
5176        puk: [0_u8; 16usize],
5177        roaming: 0_u8,
5178        response: CellularConfigResponse::DEFAULT,
5179    };
5180    #[cfg(feature = "arbitrary")]
5181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5182        use arbitrary::{Arbitrary, Unstructured};
5183        let mut buf = [0u8; 1024];
5184        rng.fill_bytes(&mut buf);
5185        let mut unstructured = Unstructured::new(&buf);
5186        Self::arbitrary(&mut unstructured).unwrap_or_default()
5187    }
5188}
5189impl Default for CELLULAR_CONFIG_DATA {
5190    fn default() -> Self {
5191        Self::DEFAULT.clone()
5192    }
5193}
5194impl MessageData for CELLULAR_CONFIG_DATA {
5195    type Message = MavMessage;
5196    const ID: u32 = 336u32;
5197    const NAME: &'static str = "CELLULAR_CONFIG";
5198    const EXTRA_CRC: u8 = 245u8;
5199    const ENCODED_LEN: usize = 84usize;
5200    fn deser(
5201        _version: MavlinkVersion,
5202        __input: &[u8],
5203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5204        let avail_len = __input.len();
5205        let mut payload_buf = [0; Self::ENCODED_LEN];
5206        let mut buf = if avail_len < Self::ENCODED_LEN {
5207            payload_buf[0..avail_len].copy_from_slice(__input);
5208            Bytes::new(&payload_buf)
5209        } else {
5210            Bytes::new(__input)
5211        };
5212        let mut __struct = Self::default();
5213        __struct.enable_lte = buf.get_u8();
5214        __struct.enable_pin = buf.get_u8();
5215        for v in &mut __struct.pin {
5216            let val = buf.get_u8();
5217            *v = val;
5218        }
5219        for v in &mut __struct.new_pin {
5220            let val = buf.get_u8();
5221            *v = val;
5222        }
5223        for v in &mut __struct.apn {
5224            let val = buf.get_u8();
5225            *v = val;
5226        }
5227        for v in &mut __struct.puk {
5228            let val = buf.get_u8();
5229            *v = val;
5230        }
5231        __struct.roaming = buf.get_u8();
5232        let tmp = buf.get_u8();
5233        __struct.response =
5234            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5235                enum_type: "CellularConfigResponse",
5236                value: tmp as u32,
5237            })?;
5238        Ok(__struct)
5239    }
5240    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5241        let mut __tmp = BytesMut::new(bytes);
5242        #[allow(clippy::absurd_extreme_comparisons)]
5243        #[allow(unused_comparisons)]
5244        if __tmp.remaining() < Self::ENCODED_LEN {
5245            panic!(
5246                "buffer is too small (need {} bytes, but got {})",
5247                Self::ENCODED_LEN,
5248                __tmp.remaining(),
5249            )
5250        }
5251        __tmp.put_u8(self.enable_lte);
5252        __tmp.put_u8(self.enable_pin);
5253        for val in &self.pin {
5254            __tmp.put_u8(*val);
5255        }
5256        for val in &self.new_pin {
5257            __tmp.put_u8(*val);
5258        }
5259        for val in &self.apn {
5260            __tmp.put_u8(*val);
5261        }
5262        for val in &self.puk {
5263            __tmp.put_u8(*val);
5264        }
5265        __tmp.put_u8(self.roaming);
5266        __tmp.put_u8(self.response as u8);
5267        if matches!(version, MavlinkVersion::V2) {
5268            let len = __tmp.len();
5269            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5270        } else {
5271            __tmp.len()
5272        }
5273    }
5274}
5275#[doc = "id: 271"]
5276#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
5277#[derive(Debug, Clone, PartialEq)]
5278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5280pub struct CAMERA_FOV_STATUS_DATA {
5281    #[doc = "Timestamp (time since system boot)."]
5282    pub time_boot_ms: u32,
5283    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
5284    pub lat_camera: i32,
5285    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
5286    pub lon_camera: i32,
5287    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
5288    pub alt_camera: i32,
5289    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
5290    pub lat_image: i32,
5291    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
5292    pub lon_image: i32,
5293    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
5294    pub alt_image: i32,
5295    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5296    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5297    pub q: [f32; 4],
5298    #[doc = "Horizontal field of view (NaN if unknown)."]
5299    pub hfov: f32,
5300    #[doc = "Vertical field of view (NaN if unknown)."]
5301    pub vfov: f32,
5302    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
5303    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5304    pub camera_device_id: u8,
5305}
5306impl CAMERA_FOV_STATUS_DATA {
5307    pub const ENCODED_LEN: usize = 53usize;
5308    pub const DEFAULT: Self = Self {
5309        time_boot_ms: 0_u32,
5310        lat_camera: 0_i32,
5311        lon_camera: 0_i32,
5312        alt_camera: 0_i32,
5313        lat_image: 0_i32,
5314        lon_image: 0_i32,
5315        alt_image: 0_i32,
5316        q: [0.0_f32; 4usize],
5317        hfov: 0.0_f32,
5318        vfov: 0.0_f32,
5319        camera_device_id: 0_u8,
5320    };
5321    #[cfg(feature = "arbitrary")]
5322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5323        use arbitrary::{Arbitrary, Unstructured};
5324        let mut buf = [0u8; 1024];
5325        rng.fill_bytes(&mut buf);
5326        let mut unstructured = Unstructured::new(&buf);
5327        Self::arbitrary(&mut unstructured).unwrap_or_default()
5328    }
5329}
5330impl Default for CAMERA_FOV_STATUS_DATA {
5331    fn default() -> Self {
5332        Self::DEFAULT.clone()
5333    }
5334}
5335impl MessageData for CAMERA_FOV_STATUS_DATA {
5336    type Message = MavMessage;
5337    const ID: u32 = 271u32;
5338    const NAME: &'static str = "CAMERA_FOV_STATUS";
5339    const EXTRA_CRC: u8 = 22u8;
5340    const ENCODED_LEN: usize = 53usize;
5341    fn deser(
5342        _version: MavlinkVersion,
5343        __input: &[u8],
5344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5345        let avail_len = __input.len();
5346        let mut payload_buf = [0; Self::ENCODED_LEN];
5347        let mut buf = if avail_len < Self::ENCODED_LEN {
5348            payload_buf[0..avail_len].copy_from_slice(__input);
5349            Bytes::new(&payload_buf)
5350        } else {
5351            Bytes::new(__input)
5352        };
5353        let mut __struct = Self::default();
5354        __struct.time_boot_ms = buf.get_u32_le();
5355        __struct.lat_camera = buf.get_i32_le();
5356        __struct.lon_camera = buf.get_i32_le();
5357        __struct.alt_camera = buf.get_i32_le();
5358        __struct.lat_image = buf.get_i32_le();
5359        __struct.lon_image = buf.get_i32_le();
5360        __struct.alt_image = buf.get_i32_le();
5361        for v in &mut __struct.q {
5362            let val = buf.get_f32_le();
5363            *v = val;
5364        }
5365        __struct.hfov = buf.get_f32_le();
5366        __struct.vfov = buf.get_f32_le();
5367        __struct.camera_device_id = buf.get_u8();
5368        Ok(__struct)
5369    }
5370    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5371        let mut __tmp = BytesMut::new(bytes);
5372        #[allow(clippy::absurd_extreme_comparisons)]
5373        #[allow(unused_comparisons)]
5374        if __tmp.remaining() < Self::ENCODED_LEN {
5375            panic!(
5376                "buffer is too small (need {} bytes, but got {})",
5377                Self::ENCODED_LEN,
5378                __tmp.remaining(),
5379            )
5380        }
5381        __tmp.put_u32_le(self.time_boot_ms);
5382        __tmp.put_i32_le(self.lat_camera);
5383        __tmp.put_i32_le(self.lon_camera);
5384        __tmp.put_i32_le(self.alt_camera);
5385        __tmp.put_i32_le(self.lat_image);
5386        __tmp.put_i32_le(self.lon_image);
5387        __tmp.put_i32_le(self.alt_image);
5388        for val in &self.q {
5389            __tmp.put_f32_le(*val);
5390        }
5391        __tmp.put_f32_le(self.hfov);
5392        __tmp.put_f32_le(self.vfov);
5393        __tmp.put_u8(self.camera_device_id);
5394        if matches!(version, MavlinkVersion::V2) {
5395            let len = __tmp.len();
5396            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5397        } else {
5398            __tmp.len()
5399        }
5400    }
5401}
5402#[doc = "id: 0"]
5403#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
5404#[derive(Debug, Clone, PartialEq)]
5405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5407pub struct HEARTBEAT_DATA {
5408    #[doc = "A bitfield for use for autopilot-specific flags"]
5409    pub custom_mode: u32,
5410    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
5411    pub mavtype: MavType,
5412    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
5413    pub autopilot: MavAutopilot,
5414    #[doc = "System mode bitmap."]
5415    pub base_mode: MavModeFlag,
5416    #[doc = "System status flag."]
5417    pub system_status: MavState,
5418    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
5419    pub mavlink_version: u8,
5420}
5421impl HEARTBEAT_DATA {
5422    pub const ENCODED_LEN: usize = 9usize;
5423    pub const DEFAULT: Self = Self {
5424        custom_mode: 0_u32,
5425        mavtype: MavType::DEFAULT,
5426        autopilot: MavAutopilot::DEFAULT,
5427        base_mode: MavModeFlag::DEFAULT,
5428        system_status: MavState::DEFAULT,
5429        mavlink_version: 0_u8,
5430    };
5431    #[cfg(feature = "arbitrary")]
5432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5433        use arbitrary::{Arbitrary, Unstructured};
5434        let mut buf = [0u8; 1024];
5435        rng.fill_bytes(&mut buf);
5436        let mut unstructured = Unstructured::new(&buf);
5437        Self::arbitrary(&mut unstructured).unwrap_or_default()
5438    }
5439}
5440impl Default for HEARTBEAT_DATA {
5441    fn default() -> Self {
5442        Self::DEFAULT.clone()
5443    }
5444}
5445impl MessageData for HEARTBEAT_DATA {
5446    type Message = MavMessage;
5447    const ID: u32 = 0u32;
5448    const NAME: &'static str = "HEARTBEAT";
5449    const EXTRA_CRC: u8 = 50u8;
5450    const ENCODED_LEN: usize = 9usize;
5451    fn deser(
5452        _version: MavlinkVersion,
5453        __input: &[u8],
5454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5455        let avail_len = __input.len();
5456        let mut payload_buf = [0; Self::ENCODED_LEN];
5457        let mut buf = if avail_len < Self::ENCODED_LEN {
5458            payload_buf[0..avail_len].copy_from_slice(__input);
5459            Bytes::new(&payload_buf)
5460        } else {
5461            Bytes::new(__input)
5462        };
5463        let mut __struct = Self::default();
5464        __struct.custom_mode = buf.get_u32_le();
5465        let tmp = buf.get_u8();
5466        __struct.mavtype =
5467            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5468                enum_type: "MavType",
5469                value: tmp as u32,
5470            })?;
5471        let tmp = buf.get_u8();
5472        __struct.autopilot =
5473            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5474                enum_type: "MavAutopilot",
5475                value: tmp as u32,
5476            })?;
5477        let tmp = buf.get_u8();
5478        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
5479            ::mavlink_core::error::ParserError::InvalidFlag {
5480                flag_type: "MavModeFlag",
5481                value: tmp as u32,
5482            },
5483        )?;
5484        let tmp = buf.get_u8();
5485        __struct.system_status =
5486            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5487                enum_type: "MavState",
5488                value: tmp as u32,
5489            })?;
5490        __struct.mavlink_version = buf.get_u8();
5491        Ok(__struct)
5492    }
5493    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5494        let mut __tmp = BytesMut::new(bytes);
5495        #[allow(clippy::absurd_extreme_comparisons)]
5496        #[allow(unused_comparisons)]
5497        if __tmp.remaining() < Self::ENCODED_LEN {
5498            panic!(
5499                "buffer is too small (need {} bytes, but got {})",
5500                Self::ENCODED_LEN,
5501                __tmp.remaining(),
5502            )
5503        }
5504        __tmp.put_u32_le(self.custom_mode);
5505        __tmp.put_u8(self.mavtype as u8);
5506        __tmp.put_u8(self.autopilot as u8);
5507        __tmp.put_u8(self.base_mode.bits());
5508        __tmp.put_u8(self.system_status as u8);
5509        __tmp.put_u8(self.mavlink_version);
5510        if matches!(version, MavlinkVersion::V2) {
5511            let len = __tmp.len();
5512            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5513        } else {
5514            __tmp.len()
5515        }
5516    }
5517}
5518#[doc = "id: 75"]
5519#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
5520#[derive(Debug, Clone, PartialEq)]
5521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5523pub struct COMMAND_INT_DATA {
5524    #[doc = "PARAM1, see MAV_CMD enum"]
5525    pub param1: f32,
5526    #[doc = "PARAM2, see MAV_CMD enum"]
5527    pub param2: f32,
5528    #[doc = "PARAM3, see MAV_CMD enum"]
5529    pub param3: f32,
5530    #[doc = "PARAM4, see MAV_CMD enum"]
5531    pub param4: f32,
5532    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
5533    pub x: i32,
5534    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
5535    pub y: i32,
5536    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
5537    pub z: f32,
5538    #[doc = "The scheduled action for the mission item."]
5539    pub command: MavCmd,
5540    #[doc = "System ID"]
5541    pub target_system: u8,
5542    #[doc = "Component ID"]
5543    pub target_component: u8,
5544    #[doc = "The coordinate system of the COMMAND."]
5545    pub frame: MavFrame,
5546    #[doc = "Not used."]
5547    pub current: u8,
5548    #[doc = "Not used (set 0)."]
5549    pub autocontinue: u8,
5550}
5551impl COMMAND_INT_DATA {
5552    pub const ENCODED_LEN: usize = 35usize;
5553    pub const DEFAULT: Self = Self {
5554        param1: 0.0_f32,
5555        param2: 0.0_f32,
5556        param3: 0.0_f32,
5557        param4: 0.0_f32,
5558        x: 0_i32,
5559        y: 0_i32,
5560        z: 0.0_f32,
5561        command: MavCmd::DEFAULT,
5562        target_system: 0_u8,
5563        target_component: 0_u8,
5564        frame: MavFrame::DEFAULT,
5565        current: 0_u8,
5566        autocontinue: 0_u8,
5567    };
5568    #[cfg(feature = "arbitrary")]
5569    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5570        use arbitrary::{Arbitrary, Unstructured};
5571        let mut buf = [0u8; 1024];
5572        rng.fill_bytes(&mut buf);
5573        let mut unstructured = Unstructured::new(&buf);
5574        Self::arbitrary(&mut unstructured).unwrap_or_default()
5575    }
5576}
5577impl Default for COMMAND_INT_DATA {
5578    fn default() -> Self {
5579        Self::DEFAULT.clone()
5580    }
5581}
5582impl MessageData for COMMAND_INT_DATA {
5583    type Message = MavMessage;
5584    const ID: u32 = 75u32;
5585    const NAME: &'static str = "COMMAND_INT";
5586    const EXTRA_CRC: u8 = 158u8;
5587    const ENCODED_LEN: usize = 35usize;
5588    fn deser(
5589        _version: MavlinkVersion,
5590        __input: &[u8],
5591    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5592        let avail_len = __input.len();
5593        let mut payload_buf = [0; Self::ENCODED_LEN];
5594        let mut buf = if avail_len < Self::ENCODED_LEN {
5595            payload_buf[0..avail_len].copy_from_slice(__input);
5596            Bytes::new(&payload_buf)
5597        } else {
5598            Bytes::new(__input)
5599        };
5600        let mut __struct = Self::default();
5601        __struct.param1 = buf.get_f32_le();
5602        __struct.param2 = buf.get_f32_le();
5603        __struct.param3 = buf.get_f32_le();
5604        __struct.param4 = buf.get_f32_le();
5605        __struct.x = buf.get_i32_le();
5606        __struct.y = buf.get_i32_le();
5607        __struct.z = buf.get_f32_le();
5608        let tmp = buf.get_u16_le();
5609        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
5610            ::mavlink_core::error::ParserError::InvalidEnum {
5611                enum_type: "MavCmd",
5612                value: tmp as u32,
5613            },
5614        )?;
5615        __struct.target_system = buf.get_u8();
5616        __struct.target_component = buf.get_u8();
5617        let tmp = buf.get_u8();
5618        __struct.frame =
5619            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5620                enum_type: "MavFrame",
5621                value: tmp as u32,
5622            })?;
5623        __struct.current = buf.get_u8();
5624        __struct.autocontinue = buf.get_u8();
5625        Ok(__struct)
5626    }
5627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5628        let mut __tmp = BytesMut::new(bytes);
5629        #[allow(clippy::absurd_extreme_comparisons)]
5630        #[allow(unused_comparisons)]
5631        if __tmp.remaining() < Self::ENCODED_LEN {
5632            panic!(
5633                "buffer is too small (need {} bytes, but got {})",
5634                Self::ENCODED_LEN,
5635                __tmp.remaining(),
5636            )
5637        }
5638        __tmp.put_f32_le(self.param1);
5639        __tmp.put_f32_le(self.param2);
5640        __tmp.put_f32_le(self.param3);
5641        __tmp.put_f32_le(self.param4);
5642        __tmp.put_i32_le(self.x);
5643        __tmp.put_i32_le(self.y);
5644        __tmp.put_f32_le(self.z);
5645        __tmp.put_u16_le(self.command as u16);
5646        __tmp.put_u8(self.target_system);
5647        __tmp.put_u8(self.target_component);
5648        __tmp.put_u8(self.frame as u8);
5649        __tmp.put_u8(self.current);
5650        __tmp.put_u8(self.autocontinue);
5651        if matches!(version, MavlinkVersion::V2) {
5652            let len = __tmp.len();
5653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5654        } else {
5655            __tmp.len()
5656        }
5657    }
5658}
5659#[doc = "id: 412"]
5660#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
5661#[derive(Debug, Clone, PartialEq)]
5662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5664pub struct REQUEST_EVENT_DATA {
5665    #[doc = "First sequence number of the requested event."]
5666    pub first_sequence: u16,
5667    #[doc = "Last sequence number of the requested event."]
5668    pub last_sequence: u16,
5669    #[doc = "System ID"]
5670    pub target_system: u8,
5671    #[doc = "Component ID"]
5672    pub target_component: u8,
5673}
5674impl REQUEST_EVENT_DATA {
5675    pub const ENCODED_LEN: usize = 6usize;
5676    pub const DEFAULT: Self = Self {
5677        first_sequence: 0_u16,
5678        last_sequence: 0_u16,
5679        target_system: 0_u8,
5680        target_component: 0_u8,
5681    };
5682    #[cfg(feature = "arbitrary")]
5683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5684        use arbitrary::{Arbitrary, Unstructured};
5685        let mut buf = [0u8; 1024];
5686        rng.fill_bytes(&mut buf);
5687        let mut unstructured = Unstructured::new(&buf);
5688        Self::arbitrary(&mut unstructured).unwrap_or_default()
5689    }
5690}
5691impl Default for REQUEST_EVENT_DATA {
5692    fn default() -> Self {
5693        Self::DEFAULT.clone()
5694    }
5695}
5696impl MessageData for REQUEST_EVENT_DATA {
5697    type Message = MavMessage;
5698    const ID: u32 = 412u32;
5699    const NAME: &'static str = "REQUEST_EVENT";
5700    const EXTRA_CRC: u8 = 33u8;
5701    const ENCODED_LEN: usize = 6usize;
5702    fn deser(
5703        _version: MavlinkVersion,
5704        __input: &[u8],
5705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5706        let avail_len = __input.len();
5707        let mut payload_buf = [0; Self::ENCODED_LEN];
5708        let mut buf = if avail_len < Self::ENCODED_LEN {
5709            payload_buf[0..avail_len].copy_from_slice(__input);
5710            Bytes::new(&payload_buf)
5711        } else {
5712            Bytes::new(__input)
5713        };
5714        let mut __struct = Self::default();
5715        __struct.first_sequence = buf.get_u16_le();
5716        __struct.last_sequence = buf.get_u16_le();
5717        __struct.target_system = buf.get_u8();
5718        __struct.target_component = buf.get_u8();
5719        Ok(__struct)
5720    }
5721    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5722        let mut __tmp = BytesMut::new(bytes);
5723        #[allow(clippy::absurd_extreme_comparisons)]
5724        #[allow(unused_comparisons)]
5725        if __tmp.remaining() < Self::ENCODED_LEN {
5726            panic!(
5727                "buffer is too small (need {} bytes, but got {})",
5728                Self::ENCODED_LEN,
5729                __tmp.remaining(),
5730            )
5731        }
5732        __tmp.put_u16_le(self.first_sequence);
5733        __tmp.put_u16_le(self.last_sequence);
5734        __tmp.put_u8(self.target_system);
5735        __tmp.put_u8(self.target_component);
5736        if matches!(version, MavlinkVersion::V2) {
5737            let len = __tmp.len();
5738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5739        } else {
5740            __tmp.len()
5741        }
5742    }
5743}
5744#[doc = "id: 242"]
5745#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
5746#[derive(Debug, Clone, PartialEq)]
5747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5749pub struct HOME_POSITION_DATA {
5750    #[doc = "Latitude (WGS84)"]
5751    pub latitude: i32,
5752    #[doc = "Longitude (WGS84)"]
5753    pub longitude: i32,
5754    #[doc = "Altitude (MSL). Positive for up."]
5755    pub altitude: i32,
5756    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
5757    pub x: f32,
5758    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
5759    pub y: f32,
5760    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
5761    pub z: f32,
5762    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
5763    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5764    pub q: [f32; 4],
5765    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
5766    pub approach_x: f32,
5767    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
5768    pub approach_y: f32,
5769    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
5770    pub approach_z: f32,
5771    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5772    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5773    pub time_usec: u64,
5774}
5775impl HOME_POSITION_DATA {
5776    pub const ENCODED_LEN: usize = 60usize;
5777    pub const DEFAULT: Self = Self {
5778        latitude: 0_i32,
5779        longitude: 0_i32,
5780        altitude: 0_i32,
5781        x: 0.0_f32,
5782        y: 0.0_f32,
5783        z: 0.0_f32,
5784        q: [0.0_f32; 4usize],
5785        approach_x: 0.0_f32,
5786        approach_y: 0.0_f32,
5787        approach_z: 0.0_f32,
5788        time_usec: 0_u64,
5789    };
5790    #[cfg(feature = "arbitrary")]
5791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5792        use arbitrary::{Arbitrary, Unstructured};
5793        let mut buf = [0u8; 1024];
5794        rng.fill_bytes(&mut buf);
5795        let mut unstructured = Unstructured::new(&buf);
5796        Self::arbitrary(&mut unstructured).unwrap_or_default()
5797    }
5798}
5799impl Default for HOME_POSITION_DATA {
5800    fn default() -> Self {
5801        Self::DEFAULT.clone()
5802    }
5803}
5804impl MessageData for HOME_POSITION_DATA {
5805    type Message = MavMessage;
5806    const ID: u32 = 242u32;
5807    const NAME: &'static str = "HOME_POSITION";
5808    const EXTRA_CRC: u8 = 104u8;
5809    const ENCODED_LEN: usize = 60usize;
5810    fn deser(
5811        _version: MavlinkVersion,
5812        __input: &[u8],
5813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5814        let avail_len = __input.len();
5815        let mut payload_buf = [0; Self::ENCODED_LEN];
5816        let mut buf = if avail_len < Self::ENCODED_LEN {
5817            payload_buf[0..avail_len].copy_from_slice(__input);
5818            Bytes::new(&payload_buf)
5819        } else {
5820            Bytes::new(__input)
5821        };
5822        let mut __struct = Self::default();
5823        __struct.latitude = buf.get_i32_le();
5824        __struct.longitude = buf.get_i32_le();
5825        __struct.altitude = buf.get_i32_le();
5826        __struct.x = buf.get_f32_le();
5827        __struct.y = buf.get_f32_le();
5828        __struct.z = buf.get_f32_le();
5829        for v in &mut __struct.q {
5830            let val = buf.get_f32_le();
5831            *v = val;
5832        }
5833        __struct.approach_x = buf.get_f32_le();
5834        __struct.approach_y = buf.get_f32_le();
5835        __struct.approach_z = buf.get_f32_le();
5836        __struct.time_usec = buf.get_u64_le();
5837        Ok(__struct)
5838    }
5839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5840        let mut __tmp = BytesMut::new(bytes);
5841        #[allow(clippy::absurd_extreme_comparisons)]
5842        #[allow(unused_comparisons)]
5843        if __tmp.remaining() < Self::ENCODED_LEN {
5844            panic!(
5845                "buffer is too small (need {} bytes, but got {})",
5846                Self::ENCODED_LEN,
5847                __tmp.remaining(),
5848            )
5849        }
5850        __tmp.put_i32_le(self.latitude);
5851        __tmp.put_i32_le(self.longitude);
5852        __tmp.put_i32_le(self.altitude);
5853        __tmp.put_f32_le(self.x);
5854        __tmp.put_f32_le(self.y);
5855        __tmp.put_f32_le(self.z);
5856        for val in &self.q {
5857            __tmp.put_f32_le(*val);
5858        }
5859        __tmp.put_f32_le(self.approach_x);
5860        __tmp.put_f32_le(self.approach_y);
5861        __tmp.put_f32_le(self.approach_z);
5862        __tmp.put_u64_le(self.time_usec);
5863        if matches!(version, MavlinkVersion::V2) {
5864            let len = __tmp.len();
5865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5866        } else {
5867            __tmp.len()
5868        }
5869    }
5870}
5871#[doc = "id: 140"]
5872#[doc = "Set the vehicle attitude and body angular rates."]
5873#[derive(Debug, Clone, PartialEq)]
5874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5876pub struct ACTUATOR_CONTROL_TARGET_DATA {
5877    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5878    pub time_usec: u64,
5879    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
5880    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5881    pub controls: [f32; 8],
5882    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
5883    pub group_mlx: u8,
5884}
5885impl ACTUATOR_CONTROL_TARGET_DATA {
5886    pub const ENCODED_LEN: usize = 41usize;
5887    pub const DEFAULT: Self = Self {
5888        time_usec: 0_u64,
5889        controls: [0.0_f32; 8usize],
5890        group_mlx: 0_u8,
5891    };
5892    #[cfg(feature = "arbitrary")]
5893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5894        use arbitrary::{Arbitrary, Unstructured};
5895        let mut buf = [0u8; 1024];
5896        rng.fill_bytes(&mut buf);
5897        let mut unstructured = Unstructured::new(&buf);
5898        Self::arbitrary(&mut unstructured).unwrap_or_default()
5899    }
5900}
5901impl Default for ACTUATOR_CONTROL_TARGET_DATA {
5902    fn default() -> Self {
5903        Self::DEFAULT.clone()
5904    }
5905}
5906impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
5907    type Message = MavMessage;
5908    const ID: u32 = 140u32;
5909    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
5910    const EXTRA_CRC: u8 = 181u8;
5911    const ENCODED_LEN: usize = 41usize;
5912    fn deser(
5913        _version: MavlinkVersion,
5914        __input: &[u8],
5915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5916        let avail_len = __input.len();
5917        let mut payload_buf = [0; Self::ENCODED_LEN];
5918        let mut buf = if avail_len < Self::ENCODED_LEN {
5919            payload_buf[0..avail_len].copy_from_slice(__input);
5920            Bytes::new(&payload_buf)
5921        } else {
5922            Bytes::new(__input)
5923        };
5924        let mut __struct = Self::default();
5925        __struct.time_usec = buf.get_u64_le();
5926        for v in &mut __struct.controls {
5927            let val = buf.get_f32_le();
5928            *v = val;
5929        }
5930        __struct.group_mlx = buf.get_u8();
5931        Ok(__struct)
5932    }
5933    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5934        let mut __tmp = BytesMut::new(bytes);
5935        #[allow(clippy::absurd_extreme_comparisons)]
5936        #[allow(unused_comparisons)]
5937        if __tmp.remaining() < Self::ENCODED_LEN {
5938            panic!(
5939                "buffer is too small (need {} bytes, but got {})",
5940                Self::ENCODED_LEN,
5941                __tmp.remaining(),
5942            )
5943        }
5944        __tmp.put_u64_le(self.time_usec);
5945        for val in &self.controls {
5946            __tmp.put_f32_le(*val);
5947        }
5948        __tmp.put_u8(self.group_mlx);
5949        if matches!(version, MavlinkVersion::V2) {
5950            let len = __tmp.len();
5951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5952        } else {
5953            __tmp.len()
5954        }
5955    }
5956}
5957#[doc = "id: 437"]
5958#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
5959#[derive(Debug, Clone, PartialEq)]
5960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5962pub struct AVAILABLE_MODES_MONITOR_DATA {
5963    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
5964    pub seq: u8,
5965}
5966impl AVAILABLE_MODES_MONITOR_DATA {
5967    pub const ENCODED_LEN: usize = 1usize;
5968    pub const DEFAULT: Self = Self { seq: 0_u8 };
5969    #[cfg(feature = "arbitrary")]
5970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5971        use arbitrary::{Arbitrary, Unstructured};
5972        let mut buf = [0u8; 1024];
5973        rng.fill_bytes(&mut buf);
5974        let mut unstructured = Unstructured::new(&buf);
5975        Self::arbitrary(&mut unstructured).unwrap_or_default()
5976    }
5977}
5978impl Default for AVAILABLE_MODES_MONITOR_DATA {
5979    fn default() -> Self {
5980        Self::DEFAULT.clone()
5981    }
5982}
5983impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
5984    type Message = MavMessage;
5985    const ID: u32 = 437u32;
5986    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
5987    const EXTRA_CRC: u8 = 30u8;
5988    const ENCODED_LEN: usize = 1usize;
5989    fn deser(
5990        _version: MavlinkVersion,
5991        __input: &[u8],
5992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5993        let avail_len = __input.len();
5994        let mut payload_buf = [0; Self::ENCODED_LEN];
5995        let mut buf = if avail_len < Self::ENCODED_LEN {
5996            payload_buf[0..avail_len].copy_from_slice(__input);
5997            Bytes::new(&payload_buf)
5998        } else {
5999            Bytes::new(__input)
6000        };
6001        let mut __struct = Self::default();
6002        __struct.seq = buf.get_u8();
6003        Ok(__struct)
6004    }
6005    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6006        let mut __tmp = BytesMut::new(bytes);
6007        #[allow(clippy::absurd_extreme_comparisons)]
6008        #[allow(unused_comparisons)]
6009        if __tmp.remaining() < Self::ENCODED_LEN {
6010            panic!(
6011                "buffer is too small (need {} bytes, but got {})",
6012                Self::ENCODED_LEN,
6013                __tmp.remaining(),
6014            )
6015        }
6016        __tmp.put_u8(self.seq);
6017        if matches!(version, MavlinkVersion::V2) {
6018            let len = __tmp.len();
6019            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6020        } else {
6021            __tmp.len()
6022        }
6023    }
6024}
6025#[doc = "id: 253"]
6026#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
6027#[derive(Debug, Clone, PartialEq)]
6028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6030pub struct STATUSTEXT_DATA {
6031    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
6032    pub severity: MavSeverity,
6033    #[doc = "Status text message, without null termination character"]
6034    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6035    pub text: [u8; 50],
6036    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
6037    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6038    pub id: u16,
6039    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
6040    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6041    pub chunk_seq: u8,
6042}
6043impl STATUSTEXT_DATA {
6044    pub const ENCODED_LEN: usize = 54usize;
6045    pub const DEFAULT: Self = Self {
6046        severity: MavSeverity::DEFAULT,
6047        text: [0_u8; 50usize],
6048        id: 0_u16,
6049        chunk_seq: 0_u8,
6050    };
6051    #[cfg(feature = "arbitrary")]
6052    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6053        use arbitrary::{Arbitrary, Unstructured};
6054        let mut buf = [0u8; 1024];
6055        rng.fill_bytes(&mut buf);
6056        let mut unstructured = Unstructured::new(&buf);
6057        Self::arbitrary(&mut unstructured).unwrap_or_default()
6058    }
6059}
6060impl Default for STATUSTEXT_DATA {
6061    fn default() -> Self {
6062        Self::DEFAULT.clone()
6063    }
6064}
6065impl MessageData for STATUSTEXT_DATA {
6066    type Message = MavMessage;
6067    const ID: u32 = 253u32;
6068    const NAME: &'static str = "STATUSTEXT";
6069    const EXTRA_CRC: u8 = 83u8;
6070    const ENCODED_LEN: usize = 54usize;
6071    fn deser(
6072        _version: MavlinkVersion,
6073        __input: &[u8],
6074    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6075        let avail_len = __input.len();
6076        let mut payload_buf = [0; Self::ENCODED_LEN];
6077        let mut buf = if avail_len < Self::ENCODED_LEN {
6078            payload_buf[0..avail_len].copy_from_slice(__input);
6079            Bytes::new(&payload_buf)
6080        } else {
6081            Bytes::new(__input)
6082        };
6083        let mut __struct = Self::default();
6084        let tmp = buf.get_u8();
6085        __struct.severity =
6086            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6087                enum_type: "MavSeverity",
6088                value: tmp as u32,
6089            })?;
6090        for v in &mut __struct.text {
6091            let val = buf.get_u8();
6092            *v = val;
6093        }
6094        __struct.id = buf.get_u16_le();
6095        __struct.chunk_seq = buf.get_u8();
6096        Ok(__struct)
6097    }
6098    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6099        let mut __tmp = BytesMut::new(bytes);
6100        #[allow(clippy::absurd_extreme_comparisons)]
6101        #[allow(unused_comparisons)]
6102        if __tmp.remaining() < Self::ENCODED_LEN {
6103            panic!(
6104                "buffer is too small (need {} bytes, but got {})",
6105                Self::ENCODED_LEN,
6106                __tmp.remaining(),
6107            )
6108        }
6109        __tmp.put_u8(self.severity as u8);
6110        for val in &self.text {
6111            __tmp.put_u8(*val);
6112        }
6113        __tmp.put_u16_le(self.id);
6114        __tmp.put_u8(self.chunk_seq);
6115        if matches!(version, MavlinkVersion::V2) {
6116            let len = __tmp.len();
6117            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6118        } else {
6119            __tmp.len()
6120        }
6121    }
6122}
6123#[doc = "id: 30"]
6124#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
6125#[derive(Debug, Clone, PartialEq)]
6126#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6127#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6128pub struct ATTITUDE_DATA {
6129    #[doc = "Timestamp (time since system boot)."]
6130    pub time_boot_ms: u32,
6131    #[doc = "Roll angle (-pi..+pi)"]
6132    pub roll: f32,
6133    #[doc = "Pitch angle (-pi..+pi)"]
6134    pub pitch: f32,
6135    #[doc = "Yaw angle (-pi..+pi)"]
6136    pub yaw: f32,
6137    #[doc = "Roll angular speed"]
6138    pub rollspeed: f32,
6139    #[doc = "Pitch angular speed"]
6140    pub pitchspeed: f32,
6141    #[doc = "Yaw angular speed"]
6142    pub yawspeed: f32,
6143}
6144impl ATTITUDE_DATA {
6145    pub const ENCODED_LEN: usize = 28usize;
6146    pub const DEFAULT: Self = Self {
6147        time_boot_ms: 0_u32,
6148        roll: 0.0_f32,
6149        pitch: 0.0_f32,
6150        yaw: 0.0_f32,
6151        rollspeed: 0.0_f32,
6152        pitchspeed: 0.0_f32,
6153        yawspeed: 0.0_f32,
6154    };
6155    #[cfg(feature = "arbitrary")]
6156    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6157        use arbitrary::{Arbitrary, Unstructured};
6158        let mut buf = [0u8; 1024];
6159        rng.fill_bytes(&mut buf);
6160        let mut unstructured = Unstructured::new(&buf);
6161        Self::arbitrary(&mut unstructured).unwrap_or_default()
6162    }
6163}
6164impl Default for ATTITUDE_DATA {
6165    fn default() -> Self {
6166        Self::DEFAULT.clone()
6167    }
6168}
6169impl MessageData for ATTITUDE_DATA {
6170    type Message = MavMessage;
6171    const ID: u32 = 30u32;
6172    const NAME: &'static str = "ATTITUDE";
6173    const EXTRA_CRC: u8 = 39u8;
6174    const ENCODED_LEN: usize = 28usize;
6175    fn deser(
6176        _version: MavlinkVersion,
6177        __input: &[u8],
6178    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6179        let avail_len = __input.len();
6180        let mut payload_buf = [0; Self::ENCODED_LEN];
6181        let mut buf = if avail_len < Self::ENCODED_LEN {
6182            payload_buf[0..avail_len].copy_from_slice(__input);
6183            Bytes::new(&payload_buf)
6184        } else {
6185            Bytes::new(__input)
6186        };
6187        let mut __struct = Self::default();
6188        __struct.time_boot_ms = buf.get_u32_le();
6189        __struct.roll = buf.get_f32_le();
6190        __struct.pitch = buf.get_f32_le();
6191        __struct.yaw = buf.get_f32_le();
6192        __struct.rollspeed = buf.get_f32_le();
6193        __struct.pitchspeed = buf.get_f32_le();
6194        __struct.yawspeed = buf.get_f32_le();
6195        Ok(__struct)
6196    }
6197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6198        let mut __tmp = BytesMut::new(bytes);
6199        #[allow(clippy::absurd_extreme_comparisons)]
6200        #[allow(unused_comparisons)]
6201        if __tmp.remaining() < Self::ENCODED_LEN {
6202            panic!(
6203                "buffer is too small (need {} bytes, but got {})",
6204                Self::ENCODED_LEN,
6205                __tmp.remaining(),
6206            )
6207        }
6208        __tmp.put_u32_le(self.time_boot_ms);
6209        __tmp.put_f32_le(self.roll);
6210        __tmp.put_f32_le(self.pitch);
6211        __tmp.put_f32_le(self.yaw);
6212        __tmp.put_f32_le(self.rollspeed);
6213        __tmp.put_f32_le(self.pitchspeed);
6214        __tmp.put_f32_le(self.yawspeed);
6215        if matches!(version, MavlinkVersion::V2) {
6216            let len = __tmp.len();
6217            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6218        } else {
6219            __tmp.len()
6220        }
6221    }
6222}
6223#[doc = "id: 85"]
6224#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
6225#[derive(Debug, Clone, PartialEq)]
6226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6228pub struct POSITION_TARGET_LOCAL_NED_DATA {
6229    #[doc = "Timestamp (time since system boot)."]
6230    pub time_boot_ms: u32,
6231    #[doc = "X Position in NED frame"]
6232    pub x: f32,
6233    #[doc = "Y Position in NED frame"]
6234    pub y: f32,
6235    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
6236    pub z: f32,
6237    #[doc = "X velocity in NED frame"]
6238    pub vx: f32,
6239    #[doc = "Y velocity in NED frame"]
6240    pub vy: f32,
6241    #[doc = "Z velocity in NED frame"]
6242    pub vz: f32,
6243    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
6244    pub afx: f32,
6245    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
6246    pub afy: f32,
6247    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
6248    pub afz: f32,
6249    #[doc = "yaw setpoint"]
6250    pub yaw: f32,
6251    #[doc = "yaw rate setpoint"]
6252    pub yaw_rate: f32,
6253    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
6254    pub type_mask: PositionTargetTypemask,
6255    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
6256    pub coordinate_frame: MavFrame,
6257}
6258impl POSITION_TARGET_LOCAL_NED_DATA {
6259    pub const ENCODED_LEN: usize = 51usize;
6260    pub const DEFAULT: Self = Self {
6261        time_boot_ms: 0_u32,
6262        x: 0.0_f32,
6263        y: 0.0_f32,
6264        z: 0.0_f32,
6265        vx: 0.0_f32,
6266        vy: 0.0_f32,
6267        vz: 0.0_f32,
6268        afx: 0.0_f32,
6269        afy: 0.0_f32,
6270        afz: 0.0_f32,
6271        yaw: 0.0_f32,
6272        yaw_rate: 0.0_f32,
6273        type_mask: PositionTargetTypemask::DEFAULT,
6274        coordinate_frame: MavFrame::DEFAULT,
6275    };
6276    #[cfg(feature = "arbitrary")]
6277    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6278        use arbitrary::{Arbitrary, Unstructured};
6279        let mut buf = [0u8; 1024];
6280        rng.fill_bytes(&mut buf);
6281        let mut unstructured = Unstructured::new(&buf);
6282        Self::arbitrary(&mut unstructured).unwrap_or_default()
6283    }
6284}
6285impl Default for POSITION_TARGET_LOCAL_NED_DATA {
6286    fn default() -> Self {
6287        Self::DEFAULT.clone()
6288    }
6289}
6290impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
6291    type Message = MavMessage;
6292    const ID: u32 = 85u32;
6293    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
6294    const EXTRA_CRC: u8 = 140u8;
6295    const ENCODED_LEN: usize = 51usize;
6296    fn deser(
6297        _version: MavlinkVersion,
6298        __input: &[u8],
6299    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6300        let avail_len = __input.len();
6301        let mut payload_buf = [0; Self::ENCODED_LEN];
6302        let mut buf = if avail_len < Self::ENCODED_LEN {
6303            payload_buf[0..avail_len].copy_from_slice(__input);
6304            Bytes::new(&payload_buf)
6305        } else {
6306            Bytes::new(__input)
6307        };
6308        let mut __struct = Self::default();
6309        __struct.time_boot_ms = buf.get_u32_le();
6310        __struct.x = buf.get_f32_le();
6311        __struct.y = buf.get_f32_le();
6312        __struct.z = buf.get_f32_le();
6313        __struct.vx = buf.get_f32_le();
6314        __struct.vy = buf.get_f32_le();
6315        __struct.vz = buf.get_f32_le();
6316        __struct.afx = buf.get_f32_le();
6317        __struct.afy = buf.get_f32_le();
6318        __struct.afz = buf.get_f32_le();
6319        __struct.yaw = buf.get_f32_le();
6320        __struct.yaw_rate = buf.get_f32_le();
6321        let tmp = buf.get_u16_le();
6322        __struct.type_mask = PositionTargetTypemask::from_bits(
6323            tmp & PositionTargetTypemask::all().bits(),
6324        )
6325        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6326            flag_type: "PositionTargetTypemask",
6327            value: tmp as u32,
6328        })?;
6329        let tmp = buf.get_u8();
6330        __struct.coordinate_frame =
6331            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6332                enum_type: "MavFrame",
6333                value: tmp as u32,
6334            })?;
6335        Ok(__struct)
6336    }
6337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6338        let mut __tmp = BytesMut::new(bytes);
6339        #[allow(clippy::absurd_extreme_comparisons)]
6340        #[allow(unused_comparisons)]
6341        if __tmp.remaining() < Self::ENCODED_LEN {
6342            panic!(
6343                "buffer is too small (need {} bytes, but got {})",
6344                Self::ENCODED_LEN,
6345                __tmp.remaining(),
6346            )
6347        }
6348        __tmp.put_u32_le(self.time_boot_ms);
6349        __tmp.put_f32_le(self.x);
6350        __tmp.put_f32_le(self.y);
6351        __tmp.put_f32_le(self.z);
6352        __tmp.put_f32_le(self.vx);
6353        __tmp.put_f32_le(self.vy);
6354        __tmp.put_f32_le(self.vz);
6355        __tmp.put_f32_le(self.afx);
6356        __tmp.put_f32_le(self.afy);
6357        __tmp.put_f32_le(self.afz);
6358        __tmp.put_f32_le(self.yaw);
6359        __tmp.put_f32_le(self.yaw_rate);
6360        __tmp.put_u16_le(self.type_mask.bits());
6361        __tmp.put_u8(self.coordinate_frame as u8);
6362        if matches!(version, MavlinkVersion::V2) {
6363            let len = __tmp.len();
6364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6365        } else {
6366            __tmp.len()
6367        }
6368    }
6369}
6370#[doc = "id: 235"]
6371#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
6372#[derive(Debug, Clone, PartialEq)]
6373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6375pub struct HIGH_LATENCY2_DATA {
6376    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
6377    pub timestamp: u32,
6378    #[doc = "Latitude"]
6379    pub latitude: i32,
6380    #[doc = "Longitude"]
6381    pub longitude: i32,
6382    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
6383    pub custom_mode: u16,
6384    #[doc = "Altitude above mean sea level"]
6385    pub altitude: i16,
6386    #[doc = "Altitude setpoint"]
6387    pub target_altitude: i16,
6388    #[doc = "Distance to target waypoint or position"]
6389    pub target_distance: u16,
6390    #[doc = "Current waypoint number"]
6391    pub wp_num: u16,
6392    #[doc = "Bitmap of failure flags."]
6393    pub failure_flags: HlFailureFlag,
6394    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
6395    pub mavtype: MavType,
6396    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
6397    pub autopilot: MavAutopilot,
6398    #[doc = "Heading"]
6399    pub heading: u8,
6400    #[doc = "Heading setpoint"]
6401    pub target_heading: u8,
6402    #[doc = "Throttle"]
6403    pub throttle: u8,
6404    #[doc = "Airspeed"]
6405    pub airspeed: u8,
6406    #[doc = "Airspeed setpoint"]
6407    pub airspeed_sp: u8,
6408    #[doc = "Groundspeed"]
6409    pub groundspeed: u8,
6410    #[doc = "Windspeed"]
6411    pub windspeed: u8,
6412    #[doc = "Wind heading"]
6413    pub wind_heading: u8,
6414    #[doc = "Maximum error horizontal position since last message"]
6415    pub eph: u8,
6416    #[doc = "Maximum error vertical position since last message"]
6417    pub epv: u8,
6418    #[doc = "Air temperature"]
6419    pub temperature_air: i8,
6420    #[doc = "Maximum climb rate magnitude since last message"]
6421    pub climb_rate: i8,
6422    #[doc = "Battery level (-1 if field not provided)."]
6423    pub battery: i8,
6424    #[doc = "Field for custom payload."]
6425    pub custom0: i8,
6426    #[doc = "Field for custom payload."]
6427    pub custom1: i8,
6428    #[doc = "Field for custom payload."]
6429    pub custom2: i8,
6430}
6431impl HIGH_LATENCY2_DATA {
6432    pub const ENCODED_LEN: usize = 42usize;
6433    pub const DEFAULT: Self = Self {
6434        timestamp: 0_u32,
6435        latitude: 0_i32,
6436        longitude: 0_i32,
6437        custom_mode: 0_u16,
6438        altitude: 0_i16,
6439        target_altitude: 0_i16,
6440        target_distance: 0_u16,
6441        wp_num: 0_u16,
6442        failure_flags: HlFailureFlag::DEFAULT,
6443        mavtype: MavType::DEFAULT,
6444        autopilot: MavAutopilot::DEFAULT,
6445        heading: 0_u8,
6446        target_heading: 0_u8,
6447        throttle: 0_u8,
6448        airspeed: 0_u8,
6449        airspeed_sp: 0_u8,
6450        groundspeed: 0_u8,
6451        windspeed: 0_u8,
6452        wind_heading: 0_u8,
6453        eph: 0_u8,
6454        epv: 0_u8,
6455        temperature_air: 0_i8,
6456        climb_rate: 0_i8,
6457        battery: 0_i8,
6458        custom0: 0_i8,
6459        custom1: 0_i8,
6460        custom2: 0_i8,
6461    };
6462    #[cfg(feature = "arbitrary")]
6463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6464        use arbitrary::{Arbitrary, Unstructured};
6465        let mut buf = [0u8; 1024];
6466        rng.fill_bytes(&mut buf);
6467        let mut unstructured = Unstructured::new(&buf);
6468        Self::arbitrary(&mut unstructured).unwrap_or_default()
6469    }
6470}
6471impl Default for HIGH_LATENCY2_DATA {
6472    fn default() -> Self {
6473        Self::DEFAULT.clone()
6474    }
6475}
6476impl MessageData for HIGH_LATENCY2_DATA {
6477    type Message = MavMessage;
6478    const ID: u32 = 235u32;
6479    const NAME: &'static str = "HIGH_LATENCY2";
6480    const EXTRA_CRC: u8 = 179u8;
6481    const ENCODED_LEN: usize = 42usize;
6482    fn deser(
6483        _version: MavlinkVersion,
6484        __input: &[u8],
6485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6486        let avail_len = __input.len();
6487        let mut payload_buf = [0; Self::ENCODED_LEN];
6488        let mut buf = if avail_len < Self::ENCODED_LEN {
6489            payload_buf[0..avail_len].copy_from_slice(__input);
6490            Bytes::new(&payload_buf)
6491        } else {
6492            Bytes::new(__input)
6493        };
6494        let mut __struct = Self::default();
6495        __struct.timestamp = buf.get_u32_le();
6496        __struct.latitude = buf.get_i32_le();
6497        __struct.longitude = buf.get_i32_le();
6498        __struct.custom_mode = buf.get_u16_le();
6499        __struct.altitude = buf.get_i16_le();
6500        __struct.target_altitude = buf.get_i16_le();
6501        __struct.target_distance = buf.get_u16_le();
6502        __struct.wp_num = buf.get_u16_le();
6503        let tmp = buf.get_u16_le();
6504        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
6505            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6506                flag_type: "HlFailureFlag",
6507                value: tmp as u32,
6508            })?;
6509        let tmp = buf.get_u8();
6510        __struct.mavtype =
6511            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6512                enum_type: "MavType",
6513                value: tmp as u32,
6514            })?;
6515        let tmp = buf.get_u8();
6516        __struct.autopilot =
6517            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6518                enum_type: "MavAutopilot",
6519                value: tmp as u32,
6520            })?;
6521        __struct.heading = buf.get_u8();
6522        __struct.target_heading = buf.get_u8();
6523        __struct.throttle = buf.get_u8();
6524        __struct.airspeed = buf.get_u8();
6525        __struct.airspeed_sp = buf.get_u8();
6526        __struct.groundspeed = buf.get_u8();
6527        __struct.windspeed = buf.get_u8();
6528        __struct.wind_heading = buf.get_u8();
6529        __struct.eph = buf.get_u8();
6530        __struct.epv = buf.get_u8();
6531        __struct.temperature_air = buf.get_i8();
6532        __struct.climb_rate = buf.get_i8();
6533        __struct.battery = buf.get_i8();
6534        __struct.custom0 = buf.get_i8();
6535        __struct.custom1 = buf.get_i8();
6536        __struct.custom2 = buf.get_i8();
6537        Ok(__struct)
6538    }
6539    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6540        let mut __tmp = BytesMut::new(bytes);
6541        #[allow(clippy::absurd_extreme_comparisons)]
6542        #[allow(unused_comparisons)]
6543        if __tmp.remaining() < Self::ENCODED_LEN {
6544            panic!(
6545                "buffer is too small (need {} bytes, but got {})",
6546                Self::ENCODED_LEN,
6547                __tmp.remaining(),
6548            )
6549        }
6550        __tmp.put_u32_le(self.timestamp);
6551        __tmp.put_i32_le(self.latitude);
6552        __tmp.put_i32_le(self.longitude);
6553        __tmp.put_u16_le(self.custom_mode);
6554        __tmp.put_i16_le(self.altitude);
6555        __tmp.put_i16_le(self.target_altitude);
6556        __tmp.put_u16_le(self.target_distance);
6557        __tmp.put_u16_le(self.wp_num);
6558        __tmp.put_u16_le(self.failure_flags.bits());
6559        __tmp.put_u8(self.mavtype as u8);
6560        __tmp.put_u8(self.autopilot as u8);
6561        __tmp.put_u8(self.heading);
6562        __tmp.put_u8(self.target_heading);
6563        __tmp.put_u8(self.throttle);
6564        __tmp.put_u8(self.airspeed);
6565        __tmp.put_u8(self.airspeed_sp);
6566        __tmp.put_u8(self.groundspeed);
6567        __tmp.put_u8(self.windspeed);
6568        __tmp.put_u8(self.wind_heading);
6569        __tmp.put_u8(self.eph);
6570        __tmp.put_u8(self.epv);
6571        __tmp.put_i8(self.temperature_air);
6572        __tmp.put_i8(self.climb_rate);
6573        __tmp.put_i8(self.battery);
6574        __tmp.put_i8(self.custom0);
6575        __tmp.put_i8(self.custom1);
6576        __tmp.put_i8(self.custom2);
6577        if matches!(version, MavlinkVersion::V2) {
6578            let len = __tmp.len();
6579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6580        } else {
6581            __tmp.len()
6582        }
6583    }
6584}
6585#[doc = "id: 43"]
6586#[doc = "Request the overall list of mission items from the system/component."]
6587#[derive(Debug, Clone, PartialEq)]
6588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6590pub struct MISSION_REQUEST_LIST_DATA {
6591    #[doc = "System ID"]
6592    pub target_system: u8,
6593    #[doc = "Component ID"]
6594    pub target_component: u8,
6595    #[doc = "Mission type."]
6596    #[cfg_attr(feature = "serde", serde(default))]
6597    pub mission_type: MavMissionType,
6598}
6599impl MISSION_REQUEST_LIST_DATA {
6600    pub const ENCODED_LEN: usize = 3usize;
6601    pub const DEFAULT: Self = Self {
6602        target_system: 0_u8,
6603        target_component: 0_u8,
6604        mission_type: MavMissionType::DEFAULT,
6605    };
6606    #[cfg(feature = "arbitrary")]
6607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6608        use arbitrary::{Arbitrary, Unstructured};
6609        let mut buf = [0u8; 1024];
6610        rng.fill_bytes(&mut buf);
6611        let mut unstructured = Unstructured::new(&buf);
6612        Self::arbitrary(&mut unstructured).unwrap_or_default()
6613    }
6614}
6615impl Default for MISSION_REQUEST_LIST_DATA {
6616    fn default() -> Self {
6617        Self::DEFAULT.clone()
6618    }
6619}
6620impl MessageData for MISSION_REQUEST_LIST_DATA {
6621    type Message = MavMessage;
6622    const ID: u32 = 43u32;
6623    const NAME: &'static str = "MISSION_REQUEST_LIST";
6624    const EXTRA_CRC: u8 = 132u8;
6625    const ENCODED_LEN: usize = 3usize;
6626    fn deser(
6627        _version: MavlinkVersion,
6628        __input: &[u8],
6629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6630        let avail_len = __input.len();
6631        let mut payload_buf = [0; Self::ENCODED_LEN];
6632        let mut buf = if avail_len < Self::ENCODED_LEN {
6633            payload_buf[0..avail_len].copy_from_slice(__input);
6634            Bytes::new(&payload_buf)
6635        } else {
6636            Bytes::new(__input)
6637        };
6638        let mut __struct = Self::default();
6639        __struct.target_system = buf.get_u8();
6640        __struct.target_component = buf.get_u8();
6641        let tmp = buf.get_u8();
6642        __struct.mission_type =
6643            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6644                enum_type: "MavMissionType",
6645                value: tmp as u32,
6646            })?;
6647        Ok(__struct)
6648    }
6649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6650        let mut __tmp = BytesMut::new(bytes);
6651        #[allow(clippy::absurd_extreme_comparisons)]
6652        #[allow(unused_comparisons)]
6653        if __tmp.remaining() < Self::ENCODED_LEN {
6654            panic!(
6655                "buffer is too small (need {} bytes, but got {})",
6656                Self::ENCODED_LEN,
6657                __tmp.remaining(),
6658            )
6659        }
6660        __tmp.put_u8(self.target_system);
6661        __tmp.put_u8(self.target_component);
6662        __tmp.put_u8(self.mission_type as u8);
6663        if matches!(version, MavlinkVersion::V2) {
6664            let len = __tmp.len();
6665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6666        } else {
6667            __tmp.len()
6668        }
6669    }
6670}
6671#[doc = "id: 251"]
6672#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
6673#[derive(Debug, Clone, PartialEq)]
6674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6676pub struct NAMED_VALUE_FLOAT_DATA {
6677    #[doc = "Timestamp (time since system boot)."]
6678    pub time_boot_ms: u32,
6679    #[doc = "Floating point value"]
6680    pub value: f32,
6681    #[doc = "Name of the debug variable"]
6682    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6683    pub name: [u8; 10],
6684}
6685impl NAMED_VALUE_FLOAT_DATA {
6686    pub const ENCODED_LEN: usize = 18usize;
6687    pub const DEFAULT: Self = Self {
6688        time_boot_ms: 0_u32,
6689        value: 0.0_f32,
6690        name: [0_u8; 10usize],
6691    };
6692    #[cfg(feature = "arbitrary")]
6693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6694        use arbitrary::{Arbitrary, Unstructured};
6695        let mut buf = [0u8; 1024];
6696        rng.fill_bytes(&mut buf);
6697        let mut unstructured = Unstructured::new(&buf);
6698        Self::arbitrary(&mut unstructured).unwrap_or_default()
6699    }
6700}
6701impl Default for NAMED_VALUE_FLOAT_DATA {
6702    fn default() -> Self {
6703        Self::DEFAULT.clone()
6704    }
6705}
6706impl MessageData for NAMED_VALUE_FLOAT_DATA {
6707    type Message = MavMessage;
6708    const ID: u32 = 251u32;
6709    const NAME: &'static str = "NAMED_VALUE_FLOAT";
6710    const EXTRA_CRC: u8 = 170u8;
6711    const ENCODED_LEN: usize = 18usize;
6712    fn deser(
6713        _version: MavlinkVersion,
6714        __input: &[u8],
6715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6716        let avail_len = __input.len();
6717        let mut payload_buf = [0; Self::ENCODED_LEN];
6718        let mut buf = if avail_len < Self::ENCODED_LEN {
6719            payload_buf[0..avail_len].copy_from_slice(__input);
6720            Bytes::new(&payload_buf)
6721        } else {
6722            Bytes::new(__input)
6723        };
6724        let mut __struct = Self::default();
6725        __struct.time_boot_ms = buf.get_u32_le();
6726        __struct.value = buf.get_f32_le();
6727        for v in &mut __struct.name {
6728            let val = buf.get_u8();
6729            *v = val;
6730        }
6731        Ok(__struct)
6732    }
6733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6734        let mut __tmp = BytesMut::new(bytes);
6735        #[allow(clippy::absurd_extreme_comparisons)]
6736        #[allow(unused_comparisons)]
6737        if __tmp.remaining() < Self::ENCODED_LEN {
6738            panic!(
6739                "buffer is too small (need {} bytes, but got {})",
6740                Self::ENCODED_LEN,
6741                __tmp.remaining(),
6742            )
6743        }
6744        __tmp.put_u32_le(self.time_boot_ms);
6745        __tmp.put_f32_le(self.value);
6746        for val in &self.name {
6747            __tmp.put_u8(*val);
6748        }
6749        if matches!(version, MavlinkVersion::V2) {
6750            let len = __tmp.len();
6751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6752        } else {
6753            __tmp.len()
6754        }
6755    }
6756}
6757#[doc = "id: 102"]
6758#[doc = "Local position/attitude estimate from a vision source."]
6759#[derive(Debug, Clone, PartialEq)]
6760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6762pub struct VISION_POSITION_ESTIMATE_DATA {
6763    #[doc = "Timestamp (UNIX time or time since system boot)"]
6764    pub usec: u64,
6765    #[doc = "Local X position"]
6766    pub x: f32,
6767    #[doc = "Local Y position"]
6768    pub y: f32,
6769    #[doc = "Local Z position"]
6770    pub z: f32,
6771    #[doc = "Roll angle"]
6772    pub roll: f32,
6773    #[doc = "Pitch angle"]
6774    pub pitch: f32,
6775    #[doc = "Yaw angle"]
6776    pub yaw: f32,
6777    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6778    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6779    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6780    pub covariance: [f32; 21],
6781    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
6782    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6783    pub reset_counter: u8,
6784}
6785impl VISION_POSITION_ESTIMATE_DATA {
6786    pub const ENCODED_LEN: usize = 117usize;
6787    pub const DEFAULT: Self = Self {
6788        usec: 0_u64,
6789        x: 0.0_f32,
6790        y: 0.0_f32,
6791        z: 0.0_f32,
6792        roll: 0.0_f32,
6793        pitch: 0.0_f32,
6794        yaw: 0.0_f32,
6795        covariance: [0.0_f32; 21usize],
6796        reset_counter: 0_u8,
6797    };
6798    #[cfg(feature = "arbitrary")]
6799    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6800        use arbitrary::{Arbitrary, Unstructured};
6801        let mut buf = [0u8; 1024];
6802        rng.fill_bytes(&mut buf);
6803        let mut unstructured = Unstructured::new(&buf);
6804        Self::arbitrary(&mut unstructured).unwrap_or_default()
6805    }
6806}
6807impl Default for VISION_POSITION_ESTIMATE_DATA {
6808    fn default() -> Self {
6809        Self::DEFAULT.clone()
6810    }
6811}
6812impl MessageData for VISION_POSITION_ESTIMATE_DATA {
6813    type Message = MavMessage;
6814    const ID: u32 = 102u32;
6815    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
6816    const EXTRA_CRC: u8 = 158u8;
6817    const ENCODED_LEN: usize = 117usize;
6818    fn deser(
6819        _version: MavlinkVersion,
6820        __input: &[u8],
6821    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6822        let avail_len = __input.len();
6823        let mut payload_buf = [0; Self::ENCODED_LEN];
6824        let mut buf = if avail_len < Self::ENCODED_LEN {
6825            payload_buf[0..avail_len].copy_from_slice(__input);
6826            Bytes::new(&payload_buf)
6827        } else {
6828            Bytes::new(__input)
6829        };
6830        let mut __struct = Self::default();
6831        __struct.usec = buf.get_u64_le();
6832        __struct.x = buf.get_f32_le();
6833        __struct.y = buf.get_f32_le();
6834        __struct.z = buf.get_f32_le();
6835        __struct.roll = buf.get_f32_le();
6836        __struct.pitch = buf.get_f32_le();
6837        __struct.yaw = buf.get_f32_le();
6838        for v in &mut __struct.covariance {
6839            let val = buf.get_f32_le();
6840            *v = val;
6841        }
6842        __struct.reset_counter = buf.get_u8();
6843        Ok(__struct)
6844    }
6845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6846        let mut __tmp = BytesMut::new(bytes);
6847        #[allow(clippy::absurd_extreme_comparisons)]
6848        #[allow(unused_comparisons)]
6849        if __tmp.remaining() < Self::ENCODED_LEN {
6850            panic!(
6851                "buffer is too small (need {} bytes, but got {})",
6852                Self::ENCODED_LEN,
6853                __tmp.remaining(),
6854            )
6855        }
6856        __tmp.put_u64_le(self.usec);
6857        __tmp.put_f32_le(self.x);
6858        __tmp.put_f32_le(self.y);
6859        __tmp.put_f32_le(self.z);
6860        __tmp.put_f32_le(self.roll);
6861        __tmp.put_f32_le(self.pitch);
6862        __tmp.put_f32_le(self.yaw);
6863        for val in &self.covariance {
6864            __tmp.put_f32_le(*val);
6865        }
6866        __tmp.put_u8(self.reset_counter);
6867        if matches!(version, MavlinkVersion::V2) {
6868            let len = __tmp.len();
6869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6870        } else {
6871            __tmp.len()
6872        }
6873    }
6874}
6875#[doc = "id: 108"]
6876#[doc = "Status of simulation environment, if used."]
6877#[derive(Debug, Clone, PartialEq)]
6878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6880pub struct SIM_STATE_DATA {
6881    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
6882    pub q1: f32,
6883    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
6884    pub q2: f32,
6885    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
6886    pub q3: f32,
6887    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
6888    pub q4: f32,
6889    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
6890    pub roll: f32,
6891    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
6892    pub pitch: f32,
6893    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
6894    pub yaw: f32,
6895    #[doc = "X acceleration"]
6896    pub xacc: f32,
6897    #[doc = "Y acceleration"]
6898    pub yacc: f32,
6899    #[doc = "Z acceleration"]
6900    pub zacc: f32,
6901    #[doc = "Angular speed around X axis"]
6902    pub xgyro: f32,
6903    #[doc = "Angular speed around Y axis"]
6904    pub ygyro: f32,
6905    #[doc = "Angular speed around Z axis"]
6906    pub zgyro: f32,
6907    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
6908    pub lat: f32,
6909    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
6910    pub lon: f32,
6911    #[doc = "Altitude"]
6912    pub alt: f32,
6913    #[doc = "Horizontal position standard deviation"]
6914    pub std_dev_horz: f32,
6915    #[doc = "Vertical position standard deviation"]
6916    pub std_dev_vert: f32,
6917    #[doc = "True velocity in north direction in earth-fixed NED frame"]
6918    pub vn: f32,
6919    #[doc = "True velocity in east direction in earth-fixed NED frame"]
6920    pub ve: f32,
6921    #[doc = "True velocity in down direction in earth-fixed NED frame"]
6922    pub vd: f32,
6923    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
6924    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6925    pub lat_int: i32,
6926    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
6927    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6928    pub lon_int: i32,
6929}
6930impl SIM_STATE_DATA {
6931    pub const ENCODED_LEN: usize = 92usize;
6932    pub const DEFAULT: Self = Self {
6933        q1: 0.0_f32,
6934        q2: 0.0_f32,
6935        q3: 0.0_f32,
6936        q4: 0.0_f32,
6937        roll: 0.0_f32,
6938        pitch: 0.0_f32,
6939        yaw: 0.0_f32,
6940        xacc: 0.0_f32,
6941        yacc: 0.0_f32,
6942        zacc: 0.0_f32,
6943        xgyro: 0.0_f32,
6944        ygyro: 0.0_f32,
6945        zgyro: 0.0_f32,
6946        lat: 0.0_f32,
6947        lon: 0.0_f32,
6948        alt: 0.0_f32,
6949        std_dev_horz: 0.0_f32,
6950        std_dev_vert: 0.0_f32,
6951        vn: 0.0_f32,
6952        ve: 0.0_f32,
6953        vd: 0.0_f32,
6954        lat_int: 0_i32,
6955        lon_int: 0_i32,
6956    };
6957    #[cfg(feature = "arbitrary")]
6958    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6959        use arbitrary::{Arbitrary, Unstructured};
6960        let mut buf = [0u8; 1024];
6961        rng.fill_bytes(&mut buf);
6962        let mut unstructured = Unstructured::new(&buf);
6963        Self::arbitrary(&mut unstructured).unwrap_or_default()
6964    }
6965}
6966impl Default for SIM_STATE_DATA {
6967    fn default() -> Self {
6968        Self::DEFAULT.clone()
6969    }
6970}
6971impl MessageData for SIM_STATE_DATA {
6972    type Message = MavMessage;
6973    const ID: u32 = 108u32;
6974    const NAME: &'static str = "SIM_STATE";
6975    const EXTRA_CRC: u8 = 32u8;
6976    const ENCODED_LEN: usize = 92usize;
6977    fn deser(
6978        _version: MavlinkVersion,
6979        __input: &[u8],
6980    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6981        let avail_len = __input.len();
6982        let mut payload_buf = [0; Self::ENCODED_LEN];
6983        let mut buf = if avail_len < Self::ENCODED_LEN {
6984            payload_buf[0..avail_len].copy_from_slice(__input);
6985            Bytes::new(&payload_buf)
6986        } else {
6987            Bytes::new(__input)
6988        };
6989        let mut __struct = Self::default();
6990        __struct.q1 = buf.get_f32_le();
6991        __struct.q2 = buf.get_f32_le();
6992        __struct.q3 = buf.get_f32_le();
6993        __struct.q4 = buf.get_f32_le();
6994        __struct.roll = buf.get_f32_le();
6995        __struct.pitch = buf.get_f32_le();
6996        __struct.yaw = buf.get_f32_le();
6997        __struct.xacc = buf.get_f32_le();
6998        __struct.yacc = buf.get_f32_le();
6999        __struct.zacc = buf.get_f32_le();
7000        __struct.xgyro = buf.get_f32_le();
7001        __struct.ygyro = buf.get_f32_le();
7002        __struct.zgyro = buf.get_f32_le();
7003        __struct.lat = buf.get_f32_le();
7004        __struct.lon = buf.get_f32_le();
7005        __struct.alt = buf.get_f32_le();
7006        __struct.std_dev_horz = buf.get_f32_le();
7007        __struct.std_dev_vert = buf.get_f32_le();
7008        __struct.vn = buf.get_f32_le();
7009        __struct.ve = buf.get_f32_le();
7010        __struct.vd = buf.get_f32_le();
7011        __struct.lat_int = buf.get_i32_le();
7012        __struct.lon_int = buf.get_i32_le();
7013        Ok(__struct)
7014    }
7015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7016        let mut __tmp = BytesMut::new(bytes);
7017        #[allow(clippy::absurd_extreme_comparisons)]
7018        #[allow(unused_comparisons)]
7019        if __tmp.remaining() < Self::ENCODED_LEN {
7020            panic!(
7021                "buffer is too small (need {} bytes, but got {})",
7022                Self::ENCODED_LEN,
7023                __tmp.remaining(),
7024            )
7025        }
7026        __tmp.put_f32_le(self.q1);
7027        __tmp.put_f32_le(self.q2);
7028        __tmp.put_f32_le(self.q3);
7029        __tmp.put_f32_le(self.q4);
7030        __tmp.put_f32_le(self.roll);
7031        __tmp.put_f32_le(self.pitch);
7032        __tmp.put_f32_le(self.yaw);
7033        __tmp.put_f32_le(self.xacc);
7034        __tmp.put_f32_le(self.yacc);
7035        __tmp.put_f32_le(self.zacc);
7036        __tmp.put_f32_le(self.xgyro);
7037        __tmp.put_f32_le(self.ygyro);
7038        __tmp.put_f32_le(self.zgyro);
7039        __tmp.put_f32_le(self.lat);
7040        __tmp.put_f32_le(self.lon);
7041        __tmp.put_f32_le(self.alt);
7042        __tmp.put_f32_le(self.std_dev_horz);
7043        __tmp.put_f32_le(self.std_dev_vert);
7044        __tmp.put_f32_le(self.vn);
7045        __tmp.put_f32_le(self.ve);
7046        __tmp.put_f32_le(self.vd);
7047        __tmp.put_i32_le(self.lat_int);
7048        __tmp.put_i32_le(self.lon_int);
7049        if matches!(version, MavlinkVersion::V2) {
7050            let len = __tmp.len();
7051            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7052        } else {
7053            __tmp.len()
7054        }
7055    }
7056}
7057#[doc = "id: 270"]
7058#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
7059#[derive(Debug, Clone, PartialEq)]
7060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7062pub struct VIDEO_STREAM_STATUS_DATA {
7063    #[doc = "Frame rate"]
7064    pub framerate: f32,
7065    #[doc = "Bit rate"]
7066    pub bitrate: u32,
7067    #[doc = "Bitmap of stream status flags"]
7068    pub flags: VideoStreamStatusFlags,
7069    #[doc = "Horizontal resolution"]
7070    pub resolution_h: u16,
7071    #[doc = "Vertical resolution"]
7072    pub resolution_v: u16,
7073    #[doc = "Video image rotation clockwise"]
7074    pub rotation: u16,
7075    #[doc = "Horizontal Field of view"]
7076    pub hfov: u16,
7077    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7078    pub stream_id: u8,
7079    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7080    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7081    pub camera_device_id: u8,
7082}
7083impl VIDEO_STREAM_STATUS_DATA {
7084    pub const ENCODED_LEN: usize = 20usize;
7085    pub const DEFAULT: Self = Self {
7086        framerate: 0.0_f32,
7087        bitrate: 0_u32,
7088        flags: VideoStreamStatusFlags::DEFAULT,
7089        resolution_h: 0_u16,
7090        resolution_v: 0_u16,
7091        rotation: 0_u16,
7092        hfov: 0_u16,
7093        stream_id: 0_u8,
7094        camera_device_id: 0_u8,
7095    };
7096    #[cfg(feature = "arbitrary")]
7097    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7098        use arbitrary::{Arbitrary, Unstructured};
7099        let mut buf = [0u8; 1024];
7100        rng.fill_bytes(&mut buf);
7101        let mut unstructured = Unstructured::new(&buf);
7102        Self::arbitrary(&mut unstructured).unwrap_or_default()
7103    }
7104}
7105impl Default for VIDEO_STREAM_STATUS_DATA {
7106    fn default() -> Self {
7107        Self::DEFAULT.clone()
7108    }
7109}
7110impl MessageData for VIDEO_STREAM_STATUS_DATA {
7111    type Message = MavMessage;
7112    const ID: u32 = 270u32;
7113    const NAME: &'static str = "VIDEO_STREAM_STATUS";
7114    const EXTRA_CRC: u8 = 59u8;
7115    const ENCODED_LEN: usize = 20usize;
7116    fn deser(
7117        _version: MavlinkVersion,
7118        __input: &[u8],
7119    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7120        let avail_len = __input.len();
7121        let mut payload_buf = [0; Self::ENCODED_LEN];
7122        let mut buf = if avail_len < Self::ENCODED_LEN {
7123            payload_buf[0..avail_len].copy_from_slice(__input);
7124            Bytes::new(&payload_buf)
7125        } else {
7126            Bytes::new(__input)
7127        };
7128        let mut __struct = Self::default();
7129        __struct.framerate = buf.get_f32_le();
7130        __struct.bitrate = buf.get_u32_le();
7131        let tmp = buf.get_u16_le();
7132        __struct.flags = VideoStreamStatusFlags::from_bits(
7133            tmp & VideoStreamStatusFlags::all().bits(),
7134        )
7135        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7136            flag_type: "VideoStreamStatusFlags",
7137            value: tmp as u32,
7138        })?;
7139        __struct.resolution_h = buf.get_u16_le();
7140        __struct.resolution_v = buf.get_u16_le();
7141        __struct.rotation = buf.get_u16_le();
7142        __struct.hfov = buf.get_u16_le();
7143        __struct.stream_id = buf.get_u8();
7144        __struct.camera_device_id = buf.get_u8();
7145        Ok(__struct)
7146    }
7147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7148        let mut __tmp = BytesMut::new(bytes);
7149        #[allow(clippy::absurd_extreme_comparisons)]
7150        #[allow(unused_comparisons)]
7151        if __tmp.remaining() < Self::ENCODED_LEN {
7152            panic!(
7153                "buffer is too small (need {} bytes, but got {})",
7154                Self::ENCODED_LEN,
7155                __tmp.remaining(),
7156            )
7157        }
7158        __tmp.put_f32_le(self.framerate);
7159        __tmp.put_u32_le(self.bitrate);
7160        __tmp.put_u16_le(self.flags.bits());
7161        __tmp.put_u16_le(self.resolution_h);
7162        __tmp.put_u16_le(self.resolution_v);
7163        __tmp.put_u16_le(self.rotation);
7164        __tmp.put_u16_le(self.hfov);
7165        __tmp.put_u8(self.stream_id);
7166        __tmp.put_u8(self.camera_device_id);
7167        if matches!(version, MavlinkVersion::V2) {
7168            let len = __tmp.len();
7169            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7170        } else {
7171            __tmp.len()
7172        }
7173    }
7174}
7175#[doc = "id: 2"]
7176#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
7177#[derive(Debug, Clone, PartialEq)]
7178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7180pub struct SYSTEM_TIME_DATA {
7181    #[doc = "Timestamp (UNIX epoch time)."]
7182    pub time_unix_usec: u64,
7183    #[doc = "Timestamp (time since system boot)."]
7184    pub time_boot_ms: u32,
7185}
7186impl SYSTEM_TIME_DATA {
7187    pub const ENCODED_LEN: usize = 12usize;
7188    pub const DEFAULT: Self = Self {
7189        time_unix_usec: 0_u64,
7190        time_boot_ms: 0_u32,
7191    };
7192    #[cfg(feature = "arbitrary")]
7193    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7194        use arbitrary::{Arbitrary, Unstructured};
7195        let mut buf = [0u8; 1024];
7196        rng.fill_bytes(&mut buf);
7197        let mut unstructured = Unstructured::new(&buf);
7198        Self::arbitrary(&mut unstructured).unwrap_or_default()
7199    }
7200}
7201impl Default for SYSTEM_TIME_DATA {
7202    fn default() -> Self {
7203        Self::DEFAULT.clone()
7204    }
7205}
7206impl MessageData for SYSTEM_TIME_DATA {
7207    type Message = MavMessage;
7208    const ID: u32 = 2u32;
7209    const NAME: &'static str = "SYSTEM_TIME";
7210    const EXTRA_CRC: u8 = 137u8;
7211    const ENCODED_LEN: usize = 12usize;
7212    fn deser(
7213        _version: MavlinkVersion,
7214        __input: &[u8],
7215    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7216        let avail_len = __input.len();
7217        let mut payload_buf = [0; Self::ENCODED_LEN];
7218        let mut buf = if avail_len < Self::ENCODED_LEN {
7219            payload_buf[0..avail_len].copy_from_slice(__input);
7220            Bytes::new(&payload_buf)
7221        } else {
7222            Bytes::new(__input)
7223        };
7224        let mut __struct = Self::default();
7225        __struct.time_unix_usec = buf.get_u64_le();
7226        __struct.time_boot_ms = buf.get_u32_le();
7227        Ok(__struct)
7228    }
7229    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7230        let mut __tmp = BytesMut::new(bytes);
7231        #[allow(clippy::absurd_extreme_comparisons)]
7232        #[allow(unused_comparisons)]
7233        if __tmp.remaining() < Self::ENCODED_LEN {
7234            panic!(
7235                "buffer is too small (need {} bytes, but got {})",
7236                Self::ENCODED_LEN,
7237                __tmp.remaining(),
7238            )
7239        }
7240        __tmp.put_u64_le(self.time_unix_usec);
7241        __tmp.put_u32_le(self.time_boot_ms);
7242        if matches!(version, MavlinkVersion::V2) {
7243            let len = __tmp.len();
7244            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7245        } else {
7246            __tmp.len()
7247        }
7248    }
7249}
7250#[doc = "id: 291"]
7251#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
7252#[derive(Debug, Clone, PartialEq)]
7253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7255pub struct ESC_STATUS_DATA {
7256    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
7257    pub time_usec: u64,
7258    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
7259    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7260    pub rpm: [i32; 4],
7261    #[doc = "Voltage measured from each ESC."]
7262    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7263    pub voltage: [f32; 4],
7264    #[doc = "Current measured from each ESC."]
7265    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7266    pub current: [f32; 4],
7267    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
7268    pub index: u8,
7269}
7270impl ESC_STATUS_DATA {
7271    pub const ENCODED_LEN: usize = 57usize;
7272    pub const DEFAULT: Self = Self {
7273        time_usec: 0_u64,
7274        rpm: [0_i32; 4usize],
7275        voltage: [0.0_f32; 4usize],
7276        current: [0.0_f32; 4usize],
7277        index: 0_u8,
7278    };
7279    #[cfg(feature = "arbitrary")]
7280    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7281        use arbitrary::{Arbitrary, Unstructured};
7282        let mut buf = [0u8; 1024];
7283        rng.fill_bytes(&mut buf);
7284        let mut unstructured = Unstructured::new(&buf);
7285        Self::arbitrary(&mut unstructured).unwrap_or_default()
7286    }
7287}
7288impl Default for ESC_STATUS_DATA {
7289    fn default() -> Self {
7290        Self::DEFAULT.clone()
7291    }
7292}
7293impl MessageData for ESC_STATUS_DATA {
7294    type Message = MavMessage;
7295    const ID: u32 = 291u32;
7296    const NAME: &'static str = "ESC_STATUS";
7297    const EXTRA_CRC: u8 = 10u8;
7298    const ENCODED_LEN: usize = 57usize;
7299    fn deser(
7300        _version: MavlinkVersion,
7301        __input: &[u8],
7302    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7303        let avail_len = __input.len();
7304        let mut payload_buf = [0; Self::ENCODED_LEN];
7305        let mut buf = if avail_len < Self::ENCODED_LEN {
7306            payload_buf[0..avail_len].copy_from_slice(__input);
7307            Bytes::new(&payload_buf)
7308        } else {
7309            Bytes::new(__input)
7310        };
7311        let mut __struct = Self::default();
7312        __struct.time_usec = buf.get_u64_le();
7313        for v in &mut __struct.rpm {
7314            let val = buf.get_i32_le();
7315            *v = val;
7316        }
7317        for v in &mut __struct.voltage {
7318            let val = buf.get_f32_le();
7319            *v = val;
7320        }
7321        for v in &mut __struct.current {
7322            let val = buf.get_f32_le();
7323            *v = val;
7324        }
7325        __struct.index = buf.get_u8();
7326        Ok(__struct)
7327    }
7328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7329        let mut __tmp = BytesMut::new(bytes);
7330        #[allow(clippy::absurd_extreme_comparisons)]
7331        #[allow(unused_comparisons)]
7332        if __tmp.remaining() < Self::ENCODED_LEN {
7333            panic!(
7334                "buffer is too small (need {} bytes, but got {})",
7335                Self::ENCODED_LEN,
7336                __tmp.remaining(),
7337            )
7338        }
7339        __tmp.put_u64_le(self.time_usec);
7340        for val in &self.rpm {
7341            __tmp.put_i32_le(*val);
7342        }
7343        for val in &self.voltage {
7344            __tmp.put_f32_le(*val);
7345        }
7346        for val in &self.current {
7347            __tmp.put_f32_le(*val);
7348        }
7349        __tmp.put_u8(self.index);
7350        if matches!(version, MavlinkVersion::V2) {
7351            let len = __tmp.len();
7352            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7353        } else {
7354            __tmp.len()
7355        }
7356    }
7357}
7358#[doc = "id: 263"]
7359#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7360#[derive(Debug, Clone, PartialEq)]
7361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7362#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7363pub struct CAMERA_IMAGE_CAPTURED_DATA {
7364    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7365    pub time_utc: u64,
7366    #[doc = "Timestamp (time since system boot)."]
7367    pub time_boot_ms: u32,
7368    #[doc = "Latitude where image was taken"]
7369    pub lat: i32,
7370    #[doc = "Longitude where capture was taken"]
7371    pub lon: i32,
7372    #[doc = "Altitude (MSL) where image was taken"]
7373    pub alt: i32,
7374    #[doc = "Altitude above ground"]
7375    pub relative_alt: i32,
7376    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7377    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7378    pub q: [f32; 4],
7379    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7380    pub image_index: i32,
7381    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7382    pub camera_id: u8,
7383    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7384    pub capture_result: i8,
7385    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7386    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7387    pub file_url: [u8; 205],
7388}
7389impl CAMERA_IMAGE_CAPTURED_DATA {
7390    pub const ENCODED_LEN: usize = 255usize;
7391    pub const DEFAULT: Self = Self {
7392        time_utc: 0_u64,
7393        time_boot_ms: 0_u32,
7394        lat: 0_i32,
7395        lon: 0_i32,
7396        alt: 0_i32,
7397        relative_alt: 0_i32,
7398        q: [0.0_f32; 4usize],
7399        image_index: 0_i32,
7400        camera_id: 0_u8,
7401        capture_result: 0_i8,
7402        file_url: [0_u8; 205usize],
7403    };
7404    #[cfg(feature = "arbitrary")]
7405    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7406        use arbitrary::{Arbitrary, Unstructured};
7407        let mut buf = [0u8; 1024];
7408        rng.fill_bytes(&mut buf);
7409        let mut unstructured = Unstructured::new(&buf);
7410        Self::arbitrary(&mut unstructured).unwrap_or_default()
7411    }
7412}
7413impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7414    fn default() -> Self {
7415        Self::DEFAULT.clone()
7416    }
7417}
7418impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7419    type Message = MavMessage;
7420    const ID: u32 = 263u32;
7421    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7422    const EXTRA_CRC: u8 = 133u8;
7423    const ENCODED_LEN: usize = 255usize;
7424    fn deser(
7425        _version: MavlinkVersion,
7426        __input: &[u8],
7427    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7428        let avail_len = __input.len();
7429        let mut payload_buf = [0; Self::ENCODED_LEN];
7430        let mut buf = if avail_len < Self::ENCODED_LEN {
7431            payload_buf[0..avail_len].copy_from_slice(__input);
7432            Bytes::new(&payload_buf)
7433        } else {
7434            Bytes::new(__input)
7435        };
7436        let mut __struct = Self::default();
7437        __struct.time_utc = buf.get_u64_le();
7438        __struct.time_boot_ms = buf.get_u32_le();
7439        __struct.lat = buf.get_i32_le();
7440        __struct.lon = buf.get_i32_le();
7441        __struct.alt = buf.get_i32_le();
7442        __struct.relative_alt = buf.get_i32_le();
7443        for v in &mut __struct.q {
7444            let val = buf.get_f32_le();
7445            *v = val;
7446        }
7447        __struct.image_index = buf.get_i32_le();
7448        __struct.camera_id = buf.get_u8();
7449        __struct.capture_result = buf.get_i8();
7450        for v in &mut __struct.file_url {
7451            let val = buf.get_u8();
7452            *v = val;
7453        }
7454        Ok(__struct)
7455    }
7456    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7457        let mut __tmp = BytesMut::new(bytes);
7458        #[allow(clippy::absurd_extreme_comparisons)]
7459        #[allow(unused_comparisons)]
7460        if __tmp.remaining() < Self::ENCODED_LEN {
7461            panic!(
7462                "buffer is too small (need {} bytes, but got {})",
7463                Self::ENCODED_LEN,
7464                __tmp.remaining(),
7465            )
7466        }
7467        __tmp.put_u64_le(self.time_utc);
7468        __tmp.put_u32_le(self.time_boot_ms);
7469        __tmp.put_i32_le(self.lat);
7470        __tmp.put_i32_le(self.lon);
7471        __tmp.put_i32_le(self.alt);
7472        __tmp.put_i32_le(self.relative_alt);
7473        for val in &self.q {
7474            __tmp.put_f32_le(*val);
7475        }
7476        __tmp.put_i32_le(self.image_index);
7477        __tmp.put_u8(self.camera_id);
7478        __tmp.put_i8(self.capture_result);
7479        for val in &self.file_url {
7480            __tmp.put_u8(*val);
7481        }
7482        if matches!(version, MavlinkVersion::V2) {
7483            let len = __tmp.len();
7484            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7485        } else {
7486            __tmp.len()
7487        }
7488    }
7489}
7490#[doc = "id: 82"]
7491#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
7492#[derive(Debug, Clone, PartialEq)]
7493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7495pub struct SET_ATTITUDE_TARGET_DATA {
7496    #[doc = "Timestamp (time since system boot)."]
7497    pub time_boot_ms: u32,
7498    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
7499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7500    pub q: [f32; 4],
7501    #[doc = "Body roll rate"]
7502    pub body_roll_rate: f32,
7503    #[doc = "Body pitch rate"]
7504    pub body_pitch_rate: f32,
7505    #[doc = "Body yaw rate"]
7506    pub body_yaw_rate: f32,
7507    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
7508    pub thrust: f32,
7509    #[doc = "System ID"]
7510    pub target_system: u8,
7511    #[doc = "Component ID"]
7512    pub target_component: u8,
7513    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
7514    pub type_mask: AttitudeTargetTypemask,
7515    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
7516    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7517    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7518    pub thrust_body: [f32; 3],
7519}
7520impl SET_ATTITUDE_TARGET_DATA {
7521    pub const ENCODED_LEN: usize = 51usize;
7522    pub const DEFAULT: Self = Self {
7523        time_boot_ms: 0_u32,
7524        q: [0.0_f32; 4usize],
7525        body_roll_rate: 0.0_f32,
7526        body_pitch_rate: 0.0_f32,
7527        body_yaw_rate: 0.0_f32,
7528        thrust: 0.0_f32,
7529        target_system: 0_u8,
7530        target_component: 0_u8,
7531        type_mask: AttitudeTargetTypemask::DEFAULT,
7532        thrust_body: [0.0_f32; 3usize],
7533    };
7534    #[cfg(feature = "arbitrary")]
7535    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7536        use arbitrary::{Arbitrary, Unstructured};
7537        let mut buf = [0u8; 1024];
7538        rng.fill_bytes(&mut buf);
7539        let mut unstructured = Unstructured::new(&buf);
7540        Self::arbitrary(&mut unstructured).unwrap_or_default()
7541    }
7542}
7543impl Default for SET_ATTITUDE_TARGET_DATA {
7544    fn default() -> Self {
7545        Self::DEFAULT.clone()
7546    }
7547}
7548impl MessageData for SET_ATTITUDE_TARGET_DATA {
7549    type Message = MavMessage;
7550    const ID: u32 = 82u32;
7551    const NAME: &'static str = "SET_ATTITUDE_TARGET";
7552    const EXTRA_CRC: u8 = 49u8;
7553    const ENCODED_LEN: usize = 51usize;
7554    fn deser(
7555        _version: MavlinkVersion,
7556        __input: &[u8],
7557    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7558        let avail_len = __input.len();
7559        let mut payload_buf = [0; Self::ENCODED_LEN];
7560        let mut buf = if avail_len < Self::ENCODED_LEN {
7561            payload_buf[0..avail_len].copy_from_slice(__input);
7562            Bytes::new(&payload_buf)
7563        } else {
7564            Bytes::new(__input)
7565        };
7566        let mut __struct = Self::default();
7567        __struct.time_boot_ms = buf.get_u32_le();
7568        for v in &mut __struct.q {
7569            let val = buf.get_f32_le();
7570            *v = val;
7571        }
7572        __struct.body_roll_rate = buf.get_f32_le();
7573        __struct.body_pitch_rate = buf.get_f32_le();
7574        __struct.body_yaw_rate = buf.get_f32_le();
7575        __struct.thrust = buf.get_f32_le();
7576        __struct.target_system = buf.get_u8();
7577        __struct.target_component = buf.get_u8();
7578        let tmp = buf.get_u8();
7579        __struct.type_mask = AttitudeTargetTypemask::from_bits(
7580            tmp & AttitudeTargetTypemask::all().bits(),
7581        )
7582        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7583            flag_type: "AttitudeTargetTypemask",
7584            value: tmp as u32,
7585        })?;
7586        for v in &mut __struct.thrust_body {
7587            let val = buf.get_f32_le();
7588            *v = val;
7589        }
7590        Ok(__struct)
7591    }
7592    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7593        let mut __tmp = BytesMut::new(bytes);
7594        #[allow(clippy::absurd_extreme_comparisons)]
7595        #[allow(unused_comparisons)]
7596        if __tmp.remaining() < Self::ENCODED_LEN {
7597            panic!(
7598                "buffer is too small (need {} bytes, but got {})",
7599                Self::ENCODED_LEN,
7600                __tmp.remaining(),
7601            )
7602        }
7603        __tmp.put_u32_le(self.time_boot_ms);
7604        for val in &self.q {
7605            __tmp.put_f32_le(*val);
7606        }
7607        __tmp.put_f32_le(self.body_roll_rate);
7608        __tmp.put_f32_le(self.body_pitch_rate);
7609        __tmp.put_f32_le(self.body_yaw_rate);
7610        __tmp.put_f32_le(self.thrust);
7611        __tmp.put_u8(self.target_system);
7612        __tmp.put_u8(self.target_component);
7613        __tmp.put_u8(self.type_mask.bits());
7614        for val in &self.thrust_body {
7615            __tmp.put_f32_le(*val);
7616        }
7617        if matches!(version, MavlinkVersion::V2) {
7618            let len = __tmp.len();
7619            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7620        } else {
7621            __tmp.len()
7622        }
7623    }
7624}
7625#[doc = "id: 65"]
7626#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
7627#[derive(Debug, Clone, PartialEq)]
7628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7630pub struct RC_CHANNELS_DATA {
7631    #[doc = "Timestamp (time since system boot)."]
7632    pub time_boot_ms: u32,
7633    #[doc = "RC channel 1 value."]
7634    pub chan1_raw: u16,
7635    #[doc = "RC channel 2 value."]
7636    pub chan2_raw: u16,
7637    #[doc = "RC channel 3 value."]
7638    pub chan3_raw: u16,
7639    #[doc = "RC channel 4 value."]
7640    pub chan4_raw: u16,
7641    #[doc = "RC channel 5 value."]
7642    pub chan5_raw: u16,
7643    #[doc = "RC channel 6 value."]
7644    pub chan6_raw: u16,
7645    #[doc = "RC channel 7 value."]
7646    pub chan7_raw: u16,
7647    #[doc = "RC channel 8 value."]
7648    pub chan8_raw: u16,
7649    #[doc = "RC channel 9 value."]
7650    pub chan9_raw: u16,
7651    #[doc = "RC channel 10 value."]
7652    pub chan10_raw: u16,
7653    #[doc = "RC channel 11 value."]
7654    pub chan11_raw: u16,
7655    #[doc = "RC channel 12 value."]
7656    pub chan12_raw: u16,
7657    #[doc = "RC channel 13 value."]
7658    pub chan13_raw: u16,
7659    #[doc = "RC channel 14 value."]
7660    pub chan14_raw: u16,
7661    #[doc = "RC channel 15 value."]
7662    pub chan15_raw: u16,
7663    #[doc = "RC channel 16 value."]
7664    pub chan16_raw: u16,
7665    #[doc = "RC channel 17 value."]
7666    pub chan17_raw: u16,
7667    #[doc = "RC channel 18 value."]
7668    pub chan18_raw: u16,
7669    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
7670    pub chancount: u8,
7671    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
7672    pub rssi: u8,
7673}
7674impl RC_CHANNELS_DATA {
7675    pub const ENCODED_LEN: usize = 42usize;
7676    pub const DEFAULT: Self = Self {
7677        time_boot_ms: 0_u32,
7678        chan1_raw: 0_u16,
7679        chan2_raw: 0_u16,
7680        chan3_raw: 0_u16,
7681        chan4_raw: 0_u16,
7682        chan5_raw: 0_u16,
7683        chan6_raw: 0_u16,
7684        chan7_raw: 0_u16,
7685        chan8_raw: 0_u16,
7686        chan9_raw: 0_u16,
7687        chan10_raw: 0_u16,
7688        chan11_raw: 0_u16,
7689        chan12_raw: 0_u16,
7690        chan13_raw: 0_u16,
7691        chan14_raw: 0_u16,
7692        chan15_raw: 0_u16,
7693        chan16_raw: 0_u16,
7694        chan17_raw: 0_u16,
7695        chan18_raw: 0_u16,
7696        chancount: 0_u8,
7697        rssi: 0_u8,
7698    };
7699    #[cfg(feature = "arbitrary")]
7700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7701        use arbitrary::{Arbitrary, Unstructured};
7702        let mut buf = [0u8; 1024];
7703        rng.fill_bytes(&mut buf);
7704        let mut unstructured = Unstructured::new(&buf);
7705        Self::arbitrary(&mut unstructured).unwrap_or_default()
7706    }
7707}
7708impl Default for RC_CHANNELS_DATA {
7709    fn default() -> Self {
7710        Self::DEFAULT.clone()
7711    }
7712}
7713impl MessageData for RC_CHANNELS_DATA {
7714    type Message = MavMessage;
7715    const ID: u32 = 65u32;
7716    const NAME: &'static str = "RC_CHANNELS";
7717    const EXTRA_CRC: u8 = 118u8;
7718    const ENCODED_LEN: usize = 42usize;
7719    fn deser(
7720        _version: MavlinkVersion,
7721        __input: &[u8],
7722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7723        let avail_len = __input.len();
7724        let mut payload_buf = [0; Self::ENCODED_LEN];
7725        let mut buf = if avail_len < Self::ENCODED_LEN {
7726            payload_buf[0..avail_len].copy_from_slice(__input);
7727            Bytes::new(&payload_buf)
7728        } else {
7729            Bytes::new(__input)
7730        };
7731        let mut __struct = Self::default();
7732        __struct.time_boot_ms = buf.get_u32_le();
7733        __struct.chan1_raw = buf.get_u16_le();
7734        __struct.chan2_raw = buf.get_u16_le();
7735        __struct.chan3_raw = buf.get_u16_le();
7736        __struct.chan4_raw = buf.get_u16_le();
7737        __struct.chan5_raw = buf.get_u16_le();
7738        __struct.chan6_raw = buf.get_u16_le();
7739        __struct.chan7_raw = buf.get_u16_le();
7740        __struct.chan8_raw = buf.get_u16_le();
7741        __struct.chan9_raw = buf.get_u16_le();
7742        __struct.chan10_raw = buf.get_u16_le();
7743        __struct.chan11_raw = buf.get_u16_le();
7744        __struct.chan12_raw = buf.get_u16_le();
7745        __struct.chan13_raw = buf.get_u16_le();
7746        __struct.chan14_raw = buf.get_u16_le();
7747        __struct.chan15_raw = buf.get_u16_le();
7748        __struct.chan16_raw = buf.get_u16_le();
7749        __struct.chan17_raw = buf.get_u16_le();
7750        __struct.chan18_raw = buf.get_u16_le();
7751        __struct.chancount = buf.get_u8();
7752        __struct.rssi = buf.get_u8();
7753        Ok(__struct)
7754    }
7755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7756        let mut __tmp = BytesMut::new(bytes);
7757        #[allow(clippy::absurd_extreme_comparisons)]
7758        #[allow(unused_comparisons)]
7759        if __tmp.remaining() < Self::ENCODED_LEN {
7760            panic!(
7761                "buffer is too small (need {} bytes, but got {})",
7762                Self::ENCODED_LEN,
7763                __tmp.remaining(),
7764            )
7765        }
7766        __tmp.put_u32_le(self.time_boot_ms);
7767        __tmp.put_u16_le(self.chan1_raw);
7768        __tmp.put_u16_le(self.chan2_raw);
7769        __tmp.put_u16_le(self.chan3_raw);
7770        __tmp.put_u16_le(self.chan4_raw);
7771        __tmp.put_u16_le(self.chan5_raw);
7772        __tmp.put_u16_le(self.chan6_raw);
7773        __tmp.put_u16_le(self.chan7_raw);
7774        __tmp.put_u16_le(self.chan8_raw);
7775        __tmp.put_u16_le(self.chan9_raw);
7776        __tmp.put_u16_le(self.chan10_raw);
7777        __tmp.put_u16_le(self.chan11_raw);
7778        __tmp.put_u16_le(self.chan12_raw);
7779        __tmp.put_u16_le(self.chan13_raw);
7780        __tmp.put_u16_le(self.chan14_raw);
7781        __tmp.put_u16_le(self.chan15_raw);
7782        __tmp.put_u16_le(self.chan16_raw);
7783        __tmp.put_u16_le(self.chan17_raw);
7784        __tmp.put_u16_le(self.chan18_raw);
7785        __tmp.put_u8(self.chancount);
7786        __tmp.put_u8(self.rssi);
7787        if matches!(version, MavlinkVersion::V2) {
7788            let len = __tmp.len();
7789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7790        } else {
7791            __tmp.len()
7792        }
7793    }
7794}
7795#[doc = "id: 40"]
7796#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
7797#[derive(Debug, Clone, PartialEq)]
7798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7800pub struct MISSION_REQUEST_DATA {
7801    #[doc = "Sequence"]
7802    pub seq: u16,
7803    #[doc = "System ID"]
7804    pub target_system: u8,
7805    #[doc = "Component ID"]
7806    pub target_component: u8,
7807    #[doc = "Mission type."]
7808    #[cfg_attr(feature = "serde", serde(default))]
7809    pub mission_type: MavMissionType,
7810}
7811impl MISSION_REQUEST_DATA {
7812    pub const ENCODED_LEN: usize = 5usize;
7813    pub const DEFAULT: Self = Self {
7814        seq: 0_u16,
7815        target_system: 0_u8,
7816        target_component: 0_u8,
7817        mission_type: MavMissionType::DEFAULT,
7818    };
7819    #[cfg(feature = "arbitrary")]
7820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7821        use arbitrary::{Arbitrary, Unstructured};
7822        let mut buf = [0u8; 1024];
7823        rng.fill_bytes(&mut buf);
7824        let mut unstructured = Unstructured::new(&buf);
7825        Self::arbitrary(&mut unstructured).unwrap_or_default()
7826    }
7827}
7828impl Default for MISSION_REQUEST_DATA {
7829    fn default() -> Self {
7830        Self::DEFAULT.clone()
7831    }
7832}
7833impl MessageData for MISSION_REQUEST_DATA {
7834    type Message = MavMessage;
7835    const ID: u32 = 40u32;
7836    const NAME: &'static str = "MISSION_REQUEST";
7837    const EXTRA_CRC: u8 = 230u8;
7838    const ENCODED_LEN: usize = 5usize;
7839    fn deser(
7840        _version: MavlinkVersion,
7841        __input: &[u8],
7842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7843        let avail_len = __input.len();
7844        let mut payload_buf = [0; Self::ENCODED_LEN];
7845        let mut buf = if avail_len < Self::ENCODED_LEN {
7846            payload_buf[0..avail_len].copy_from_slice(__input);
7847            Bytes::new(&payload_buf)
7848        } else {
7849            Bytes::new(__input)
7850        };
7851        let mut __struct = Self::default();
7852        __struct.seq = buf.get_u16_le();
7853        __struct.target_system = buf.get_u8();
7854        __struct.target_component = buf.get_u8();
7855        let tmp = buf.get_u8();
7856        __struct.mission_type =
7857            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7858                enum_type: "MavMissionType",
7859                value: tmp as u32,
7860            })?;
7861        Ok(__struct)
7862    }
7863    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7864        let mut __tmp = BytesMut::new(bytes);
7865        #[allow(clippy::absurd_extreme_comparisons)]
7866        #[allow(unused_comparisons)]
7867        if __tmp.remaining() < Self::ENCODED_LEN {
7868            panic!(
7869                "buffer is too small (need {} bytes, but got {})",
7870                Self::ENCODED_LEN,
7871                __tmp.remaining(),
7872            )
7873        }
7874        __tmp.put_u16_le(self.seq);
7875        __tmp.put_u8(self.target_system);
7876        __tmp.put_u8(self.target_component);
7877        __tmp.put_u8(self.mission_type as u8);
7878        if matches!(version, MavlinkVersion::V2) {
7879            let len = __tmp.len();
7880            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7881        } else {
7882            __tmp.len()
7883        }
7884    }
7885}
7886#[doc = "id: 124"]
7887#[doc = "Second GPS data."]
7888#[derive(Debug, Clone, PartialEq)]
7889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7891pub struct GPS2_RAW_DATA {
7892    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7893    pub time_usec: u64,
7894    #[doc = "Latitude (WGS84)"]
7895    pub lat: i32,
7896    #[doc = "Longitude (WGS84)"]
7897    pub lon: i32,
7898    #[doc = "Altitude (MSL). Positive for up."]
7899    pub alt: i32,
7900    #[doc = "Age of DGPS info"]
7901    pub dgps_age: u32,
7902    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
7903    pub eph: u16,
7904    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
7905    pub epv: u16,
7906    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
7907    pub vel: u16,
7908    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
7909    pub cog: u16,
7910    #[doc = "GPS fix type."]
7911    pub fix_type: GpsFixType,
7912    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
7913    pub satellites_visible: u8,
7914    #[doc = "Number of DGPS satellites"]
7915    pub dgps_numch: u8,
7916    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
7917    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7918    pub yaw: u16,
7919    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
7920    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7921    pub alt_ellipsoid: i32,
7922    #[doc = "Position uncertainty."]
7923    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7924    pub h_acc: u32,
7925    #[doc = "Altitude uncertainty."]
7926    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7927    pub v_acc: u32,
7928    #[doc = "Speed uncertainty."]
7929    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7930    pub vel_acc: u32,
7931    #[doc = "Heading / track uncertainty"]
7932    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7933    pub hdg_acc: u32,
7934}
7935impl GPS2_RAW_DATA {
7936    pub const ENCODED_LEN: usize = 57usize;
7937    pub const DEFAULT: Self = Self {
7938        time_usec: 0_u64,
7939        lat: 0_i32,
7940        lon: 0_i32,
7941        alt: 0_i32,
7942        dgps_age: 0_u32,
7943        eph: 0_u16,
7944        epv: 0_u16,
7945        vel: 0_u16,
7946        cog: 0_u16,
7947        fix_type: GpsFixType::DEFAULT,
7948        satellites_visible: 0_u8,
7949        dgps_numch: 0_u8,
7950        yaw: 0_u16,
7951        alt_ellipsoid: 0_i32,
7952        h_acc: 0_u32,
7953        v_acc: 0_u32,
7954        vel_acc: 0_u32,
7955        hdg_acc: 0_u32,
7956    };
7957    #[cfg(feature = "arbitrary")]
7958    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7959        use arbitrary::{Arbitrary, Unstructured};
7960        let mut buf = [0u8; 1024];
7961        rng.fill_bytes(&mut buf);
7962        let mut unstructured = Unstructured::new(&buf);
7963        Self::arbitrary(&mut unstructured).unwrap_or_default()
7964    }
7965}
7966impl Default for GPS2_RAW_DATA {
7967    fn default() -> Self {
7968        Self::DEFAULT.clone()
7969    }
7970}
7971impl MessageData for GPS2_RAW_DATA {
7972    type Message = MavMessage;
7973    const ID: u32 = 124u32;
7974    const NAME: &'static str = "GPS2_RAW";
7975    const EXTRA_CRC: u8 = 87u8;
7976    const ENCODED_LEN: usize = 57usize;
7977    fn deser(
7978        _version: MavlinkVersion,
7979        __input: &[u8],
7980    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7981        let avail_len = __input.len();
7982        let mut payload_buf = [0; Self::ENCODED_LEN];
7983        let mut buf = if avail_len < Self::ENCODED_LEN {
7984            payload_buf[0..avail_len].copy_from_slice(__input);
7985            Bytes::new(&payload_buf)
7986        } else {
7987            Bytes::new(__input)
7988        };
7989        let mut __struct = Self::default();
7990        __struct.time_usec = buf.get_u64_le();
7991        __struct.lat = buf.get_i32_le();
7992        __struct.lon = buf.get_i32_le();
7993        __struct.alt = buf.get_i32_le();
7994        __struct.dgps_age = buf.get_u32_le();
7995        __struct.eph = buf.get_u16_le();
7996        __struct.epv = buf.get_u16_le();
7997        __struct.vel = buf.get_u16_le();
7998        __struct.cog = buf.get_u16_le();
7999        let tmp = buf.get_u8();
8000        __struct.fix_type =
8001            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8002                enum_type: "GpsFixType",
8003                value: tmp as u32,
8004            })?;
8005        __struct.satellites_visible = buf.get_u8();
8006        __struct.dgps_numch = buf.get_u8();
8007        __struct.yaw = buf.get_u16_le();
8008        __struct.alt_ellipsoid = buf.get_i32_le();
8009        __struct.h_acc = buf.get_u32_le();
8010        __struct.v_acc = buf.get_u32_le();
8011        __struct.vel_acc = buf.get_u32_le();
8012        __struct.hdg_acc = buf.get_u32_le();
8013        Ok(__struct)
8014    }
8015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8016        let mut __tmp = BytesMut::new(bytes);
8017        #[allow(clippy::absurd_extreme_comparisons)]
8018        #[allow(unused_comparisons)]
8019        if __tmp.remaining() < Self::ENCODED_LEN {
8020            panic!(
8021                "buffer is too small (need {} bytes, but got {})",
8022                Self::ENCODED_LEN,
8023                __tmp.remaining(),
8024            )
8025        }
8026        __tmp.put_u64_le(self.time_usec);
8027        __tmp.put_i32_le(self.lat);
8028        __tmp.put_i32_le(self.lon);
8029        __tmp.put_i32_le(self.alt);
8030        __tmp.put_u32_le(self.dgps_age);
8031        __tmp.put_u16_le(self.eph);
8032        __tmp.put_u16_le(self.epv);
8033        __tmp.put_u16_le(self.vel);
8034        __tmp.put_u16_le(self.cog);
8035        __tmp.put_u8(self.fix_type as u8);
8036        __tmp.put_u8(self.satellites_visible);
8037        __tmp.put_u8(self.dgps_numch);
8038        __tmp.put_u16_le(self.yaw);
8039        __tmp.put_i32_le(self.alt_ellipsoid);
8040        __tmp.put_u32_le(self.h_acc);
8041        __tmp.put_u32_le(self.v_acc);
8042        __tmp.put_u32_le(self.vel_acc);
8043        __tmp.put_u32_le(self.hdg_acc);
8044        if matches!(version, MavlinkVersion::V2) {
8045            let len = __tmp.len();
8046            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8047        } else {
8048            __tmp.len()
8049        }
8050    }
8051}
8052#[doc = "id: 128"]
8053#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
8054#[derive(Debug, Clone, PartialEq)]
8055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8057pub struct GPS2_RTK_DATA {
8058    #[doc = "Time since boot of last baseline message received."]
8059    pub time_last_baseline_ms: u32,
8060    #[doc = "GPS Time of Week of last baseline"]
8061    pub tow: u32,
8062    #[doc = "Current baseline in ECEF x or NED north component."]
8063    pub baseline_a_mm: i32,
8064    #[doc = "Current baseline in ECEF y or NED east component."]
8065    pub baseline_b_mm: i32,
8066    #[doc = "Current baseline in ECEF z or NED down component."]
8067    pub baseline_c_mm: i32,
8068    #[doc = "Current estimate of baseline accuracy."]
8069    pub accuracy: u32,
8070    #[doc = "Current number of integer ambiguity hypotheses."]
8071    pub iar_num_hypotheses: i32,
8072    #[doc = "GPS Week Number of last baseline"]
8073    pub wn: u16,
8074    #[doc = "Identification of connected RTK receiver."]
8075    pub rtk_receiver_id: u8,
8076    #[doc = "GPS-specific health report for RTK data."]
8077    pub rtk_health: u8,
8078    #[doc = "Rate of baseline messages being received by GPS"]
8079    pub rtk_rate: u8,
8080    #[doc = "Current number of sats used for RTK calculation."]
8081    pub nsats: u8,
8082    #[doc = "Coordinate system of baseline"]
8083    pub baseline_coords_type: RtkBaselineCoordinateSystem,
8084}
8085impl GPS2_RTK_DATA {
8086    pub const ENCODED_LEN: usize = 35usize;
8087    pub const DEFAULT: Self = Self {
8088        time_last_baseline_ms: 0_u32,
8089        tow: 0_u32,
8090        baseline_a_mm: 0_i32,
8091        baseline_b_mm: 0_i32,
8092        baseline_c_mm: 0_i32,
8093        accuracy: 0_u32,
8094        iar_num_hypotheses: 0_i32,
8095        wn: 0_u16,
8096        rtk_receiver_id: 0_u8,
8097        rtk_health: 0_u8,
8098        rtk_rate: 0_u8,
8099        nsats: 0_u8,
8100        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
8101    };
8102    #[cfg(feature = "arbitrary")]
8103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8104        use arbitrary::{Arbitrary, Unstructured};
8105        let mut buf = [0u8; 1024];
8106        rng.fill_bytes(&mut buf);
8107        let mut unstructured = Unstructured::new(&buf);
8108        Self::arbitrary(&mut unstructured).unwrap_or_default()
8109    }
8110}
8111impl Default for GPS2_RTK_DATA {
8112    fn default() -> Self {
8113        Self::DEFAULT.clone()
8114    }
8115}
8116impl MessageData for GPS2_RTK_DATA {
8117    type Message = MavMessage;
8118    const ID: u32 = 128u32;
8119    const NAME: &'static str = "GPS2_RTK";
8120    const EXTRA_CRC: u8 = 226u8;
8121    const ENCODED_LEN: usize = 35usize;
8122    fn deser(
8123        _version: MavlinkVersion,
8124        __input: &[u8],
8125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8126        let avail_len = __input.len();
8127        let mut payload_buf = [0; Self::ENCODED_LEN];
8128        let mut buf = if avail_len < Self::ENCODED_LEN {
8129            payload_buf[0..avail_len].copy_from_slice(__input);
8130            Bytes::new(&payload_buf)
8131        } else {
8132            Bytes::new(__input)
8133        };
8134        let mut __struct = Self::default();
8135        __struct.time_last_baseline_ms = buf.get_u32_le();
8136        __struct.tow = buf.get_u32_le();
8137        __struct.baseline_a_mm = buf.get_i32_le();
8138        __struct.baseline_b_mm = buf.get_i32_le();
8139        __struct.baseline_c_mm = buf.get_i32_le();
8140        __struct.accuracy = buf.get_u32_le();
8141        __struct.iar_num_hypotheses = buf.get_i32_le();
8142        __struct.wn = buf.get_u16_le();
8143        __struct.rtk_receiver_id = buf.get_u8();
8144        __struct.rtk_health = buf.get_u8();
8145        __struct.rtk_rate = buf.get_u8();
8146        __struct.nsats = buf.get_u8();
8147        let tmp = buf.get_u8();
8148        __struct.baseline_coords_type =
8149            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8150                enum_type: "RtkBaselineCoordinateSystem",
8151                value: tmp as u32,
8152            })?;
8153        Ok(__struct)
8154    }
8155    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8156        let mut __tmp = BytesMut::new(bytes);
8157        #[allow(clippy::absurd_extreme_comparisons)]
8158        #[allow(unused_comparisons)]
8159        if __tmp.remaining() < Self::ENCODED_LEN {
8160            panic!(
8161                "buffer is too small (need {} bytes, but got {})",
8162                Self::ENCODED_LEN,
8163                __tmp.remaining(),
8164            )
8165        }
8166        __tmp.put_u32_le(self.time_last_baseline_ms);
8167        __tmp.put_u32_le(self.tow);
8168        __tmp.put_i32_le(self.baseline_a_mm);
8169        __tmp.put_i32_le(self.baseline_b_mm);
8170        __tmp.put_i32_le(self.baseline_c_mm);
8171        __tmp.put_u32_le(self.accuracy);
8172        __tmp.put_i32_le(self.iar_num_hypotheses);
8173        __tmp.put_u16_le(self.wn);
8174        __tmp.put_u8(self.rtk_receiver_id);
8175        __tmp.put_u8(self.rtk_health);
8176        __tmp.put_u8(self.rtk_rate);
8177        __tmp.put_u8(self.nsats);
8178        __tmp.put_u8(self.baseline_coords_type as u8);
8179        if matches!(version, MavlinkVersion::V2) {
8180            let len = __tmp.len();
8181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8182        } else {
8183            __tmp.len()
8184        }
8185    }
8186}
8187#[doc = "id: 285"]
8188#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
8189#[derive(Debug, Clone, PartialEq)]
8190#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8192pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
8193    #[doc = "Timestamp (time since system boot)."]
8194    pub time_boot_ms: u32,
8195    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
8196    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8197    pub q: [f32; 4],
8198    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
8199    pub angular_velocity_x: f32,
8200    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
8201    pub angular_velocity_y: f32,
8202    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
8203    pub angular_velocity_z: f32,
8204    #[doc = "Failure flags (0 for no failure)"]
8205    pub failure_flags: GimbalDeviceErrorFlags,
8206    #[doc = "Current gimbal flags set."]
8207    pub flags: GimbalDeviceFlags,
8208    #[doc = "System ID"]
8209    pub target_system: u8,
8210    #[doc = "Component ID"]
8211    pub target_component: u8,
8212    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
8213    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8214    pub delta_yaw: f32,
8215    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
8216    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8217    pub delta_yaw_velocity: f32,
8218    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
8219    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8220    pub gimbal_device_id: u8,
8221}
8222impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
8223    pub const ENCODED_LEN: usize = 49usize;
8224    pub const DEFAULT: Self = Self {
8225        time_boot_ms: 0_u32,
8226        q: [0.0_f32; 4usize],
8227        angular_velocity_x: 0.0_f32,
8228        angular_velocity_y: 0.0_f32,
8229        angular_velocity_z: 0.0_f32,
8230        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
8231        flags: GimbalDeviceFlags::DEFAULT,
8232        target_system: 0_u8,
8233        target_component: 0_u8,
8234        delta_yaw: 0.0_f32,
8235        delta_yaw_velocity: 0.0_f32,
8236        gimbal_device_id: 0_u8,
8237    };
8238    #[cfg(feature = "arbitrary")]
8239    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8240        use arbitrary::{Arbitrary, Unstructured};
8241        let mut buf = [0u8; 1024];
8242        rng.fill_bytes(&mut buf);
8243        let mut unstructured = Unstructured::new(&buf);
8244        Self::arbitrary(&mut unstructured).unwrap_or_default()
8245    }
8246}
8247impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
8248    fn default() -> Self {
8249        Self::DEFAULT.clone()
8250    }
8251}
8252impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
8253    type Message = MavMessage;
8254    const ID: u32 = 285u32;
8255    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
8256    const EXTRA_CRC: u8 = 137u8;
8257    const ENCODED_LEN: usize = 49usize;
8258    fn deser(
8259        _version: MavlinkVersion,
8260        __input: &[u8],
8261    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8262        let avail_len = __input.len();
8263        let mut payload_buf = [0; Self::ENCODED_LEN];
8264        let mut buf = if avail_len < Self::ENCODED_LEN {
8265            payload_buf[0..avail_len].copy_from_slice(__input);
8266            Bytes::new(&payload_buf)
8267        } else {
8268            Bytes::new(__input)
8269        };
8270        let mut __struct = Self::default();
8271        __struct.time_boot_ms = buf.get_u32_le();
8272        for v in &mut __struct.q {
8273            let val = buf.get_f32_le();
8274            *v = val;
8275        }
8276        __struct.angular_velocity_x = buf.get_f32_le();
8277        __struct.angular_velocity_y = buf.get_f32_le();
8278        __struct.angular_velocity_z = buf.get_f32_le();
8279        let tmp = buf.get_u32_le();
8280        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
8281            tmp & GimbalDeviceErrorFlags::all().bits(),
8282        )
8283        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8284            flag_type: "GimbalDeviceErrorFlags",
8285            value: tmp as u32,
8286        })?;
8287        let tmp = buf.get_u16_le();
8288        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
8289            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8290                flag_type: "GimbalDeviceFlags",
8291                value: tmp as u32,
8292            })?;
8293        __struct.target_system = buf.get_u8();
8294        __struct.target_component = buf.get_u8();
8295        __struct.delta_yaw = buf.get_f32_le();
8296        __struct.delta_yaw_velocity = buf.get_f32_le();
8297        __struct.gimbal_device_id = buf.get_u8();
8298        Ok(__struct)
8299    }
8300    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8301        let mut __tmp = BytesMut::new(bytes);
8302        #[allow(clippy::absurd_extreme_comparisons)]
8303        #[allow(unused_comparisons)]
8304        if __tmp.remaining() < Self::ENCODED_LEN {
8305            panic!(
8306                "buffer is too small (need {} bytes, but got {})",
8307                Self::ENCODED_LEN,
8308                __tmp.remaining(),
8309            )
8310        }
8311        __tmp.put_u32_le(self.time_boot_ms);
8312        for val in &self.q {
8313            __tmp.put_f32_le(*val);
8314        }
8315        __tmp.put_f32_le(self.angular_velocity_x);
8316        __tmp.put_f32_le(self.angular_velocity_y);
8317        __tmp.put_f32_le(self.angular_velocity_z);
8318        __tmp.put_u32_le(self.failure_flags.bits());
8319        __tmp.put_u16_le(self.flags.bits());
8320        __tmp.put_u8(self.target_system);
8321        __tmp.put_u8(self.target_component);
8322        __tmp.put_f32_le(self.delta_yaw);
8323        __tmp.put_f32_le(self.delta_yaw_velocity);
8324        __tmp.put_u8(self.gimbal_device_id);
8325        if matches!(version, MavlinkVersion::V2) {
8326            let len = __tmp.len();
8327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8328        } else {
8329            __tmp.len()
8330        }
8331    }
8332}
8333#[doc = "id: 268"]
8334#[doc = "An ack for a LOGGING_DATA_ACKED message."]
8335#[derive(Debug, Clone, PartialEq)]
8336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8338pub struct LOGGING_ACK_DATA {
8339    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
8340    pub sequence: u16,
8341    #[doc = "system ID of the target"]
8342    pub target_system: u8,
8343    #[doc = "component ID of the target"]
8344    pub target_component: u8,
8345}
8346impl LOGGING_ACK_DATA {
8347    pub const ENCODED_LEN: usize = 4usize;
8348    pub const DEFAULT: Self = Self {
8349        sequence: 0_u16,
8350        target_system: 0_u8,
8351        target_component: 0_u8,
8352    };
8353    #[cfg(feature = "arbitrary")]
8354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8355        use arbitrary::{Arbitrary, Unstructured};
8356        let mut buf = [0u8; 1024];
8357        rng.fill_bytes(&mut buf);
8358        let mut unstructured = Unstructured::new(&buf);
8359        Self::arbitrary(&mut unstructured).unwrap_or_default()
8360    }
8361}
8362impl Default for LOGGING_ACK_DATA {
8363    fn default() -> Self {
8364        Self::DEFAULT.clone()
8365    }
8366}
8367impl MessageData for LOGGING_ACK_DATA {
8368    type Message = MavMessage;
8369    const ID: u32 = 268u32;
8370    const NAME: &'static str = "LOGGING_ACK";
8371    const EXTRA_CRC: u8 = 14u8;
8372    const ENCODED_LEN: usize = 4usize;
8373    fn deser(
8374        _version: MavlinkVersion,
8375        __input: &[u8],
8376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8377        let avail_len = __input.len();
8378        let mut payload_buf = [0; Self::ENCODED_LEN];
8379        let mut buf = if avail_len < Self::ENCODED_LEN {
8380            payload_buf[0..avail_len].copy_from_slice(__input);
8381            Bytes::new(&payload_buf)
8382        } else {
8383            Bytes::new(__input)
8384        };
8385        let mut __struct = Self::default();
8386        __struct.sequence = buf.get_u16_le();
8387        __struct.target_system = buf.get_u8();
8388        __struct.target_component = buf.get_u8();
8389        Ok(__struct)
8390    }
8391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8392        let mut __tmp = BytesMut::new(bytes);
8393        #[allow(clippy::absurd_extreme_comparisons)]
8394        #[allow(unused_comparisons)]
8395        if __tmp.remaining() < Self::ENCODED_LEN {
8396            panic!(
8397                "buffer is too small (need {} bytes, but got {})",
8398                Self::ENCODED_LEN,
8399                __tmp.remaining(),
8400            )
8401        }
8402        __tmp.put_u16_le(self.sequence);
8403        __tmp.put_u8(self.target_system);
8404        __tmp.put_u8(self.target_component);
8405        if matches!(version, MavlinkVersion::V2) {
8406            let len = __tmp.len();
8407            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8408        } else {
8409            __tmp.len()
8410        }
8411    }
8412}
8413#[doc = "id: 322"]
8414#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
8415#[derive(Debug, Clone, PartialEq)]
8416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8418pub struct PARAM_EXT_VALUE_DATA {
8419    #[doc = "Total number of parameters"]
8420    pub param_count: u16,
8421    #[doc = "Index of this parameter"]
8422    pub param_index: u16,
8423    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
8424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8425    pub param_id: [u8; 16],
8426    #[doc = "Parameter value"]
8427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8428    pub param_value: [u8; 128],
8429    #[doc = "Parameter type."]
8430    pub param_type: MavParamExtType,
8431}
8432impl PARAM_EXT_VALUE_DATA {
8433    pub const ENCODED_LEN: usize = 149usize;
8434    pub const DEFAULT: Self = Self {
8435        param_count: 0_u16,
8436        param_index: 0_u16,
8437        param_id: [0_u8; 16usize],
8438        param_value: [0_u8; 128usize],
8439        param_type: MavParamExtType::DEFAULT,
8440    };
8441    #[cfg(feature = "arbitrary")]
8442    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8443        use arbitrary::{Arbitrary, Unstructured};
8444        let mut buf = [0u8; 1024];
8445        rng.fill_bytes(&mut buf);
8446        let mut unstructured = Unstructured::new(&buf);
8447        Self::arbitrary(&mut unstructured).unwrap_or_default()
8448    }
8449}
8450impl Default for PARAM_EXT_VALUE_DATA {
8451    fn default() -> Self {
8452        Self::DEFAULT.clone()
8453    }
8454}
8455impl MessageData for PARAM_EXT_VALUE_DATA {
8456    type Message = MavMessage;
8457    const ID: u32 = 322u32;
8458    const NAME: &'static str = "PARAM_EXT_VALUE";
8459    const EXTRA_CRC: u8 = 243u8;
8460    const ENCODED_LEN: usize = 149usize;
8461    fn deser(
8462        _version: MavlinkVersion,
8463        __input: &[u8],
8464    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8465        let avail_len = __input.len();
8466        let mut payload_buf = [0; Self::ENCODED_LEN];
8467        let mut buf = if avail_len < Self::ENCODED_LEN {
8468            payload_buf[0..avail_len].copy_from_slice(__input);
8469            Bytes::new(&payload_buf)
8470        } else {
8471            Bytes::new(__input)
8472        };
8473        let mut __struct = Self::default();
8474        __struct.param_count = buf.get_u16_le();
8475        __struct.param_index = buf.get_u16_le();
8476        for v in &mut __struct.param_id {
8477            let val = buf.get_u8();
8478            *v = val;
8479        }
8480        for v in &mut __struct.param_value {
8481            let val = buf.get_u8();
8482            *v = val;
8483        }
8484        let tmp = buf.get_u8();
8485        __struct.param_type =
8486            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8487                enum_type: "MavParamExtType",
8488                value: tmp as u32,
8489            })?;
8490        Ok(__struct)
8491    }
8492    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8493        let mut __tmp = BytesMut::new(bytes);
8494        #[allow(clippy::absurd_extreme_comparisons)]
8495        #[allow(unused_comparisons)]
8496        if __tmp.remaining() < Self::ENCODED_LEN {
8497            panic!(
8498                "buffer is too small (need {} bytes, but got {})",
8499                Self::ENCODED_LEN,
8500                __tmp.remaining(),
8501            )
8502        }
8503        __tmp.put_u16_le(self.param_count);
8504        __tmp.put_u16_le(self.param_index);
8505        for val in &self.param_id {
8506            __tmp.put_u8(*val);
8507        }
8508        for val in &self.param_value {
8509            __tmp.put_u8(*val);
8510        }
8511        __tmp.put_u8(self.param_type as u8);
8512        if matches!(version, MavlinkVersion::V2) {
8513            let len = __tmp.len();
8514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8515        } else {
8516            __tmp.len()
8517        }
8518    }
8519}
8520#[doc = "id: 38"]
8521#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
8522#[derive(Debug, Clone, PartialEq)]
8523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8525pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
8526    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
8527    pub start_index: i16,
8528    #[doc = "End index, equal or greater than start index."]
8529    pub end_index: i16,
8530    #[doc = "System ID"]
8531    pub target_system: u8,
8532    #[doc = "Component ID"]
8533    pub target_component: u8,
8534    #[doc = "Mission type."]
8535    #[cfg_attr(feature = "serde", serde(default))]
8536    pub mission_type: MavMissionType,
8537}
8538impl MISSION_WRITE_PARTIAL_LIST_DATA {
8539    pub const ENCODED_LEN: usize = 7usize;
8540    pub const DEFAULT: Self = Self {
8541        start_index: 0_i16,
8542        end_index: 0_i16,
8543        target_system: 0_u8,
8544        target_component: 0_u8,
8545        mission_type: MavMissionType::DEFAULT,
8546    };
8547    #[cfg(feature = "arbitrary")]
8548    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8549        use arbitrary::{Arbitrary, Unstructured};
8550        let mut buf = [0u8; 1024];
8551        rng.fill_bytes(&mut buf);
8552        let mut unstructured = Unstructured::new(&buf);
8553        Self::arbitrary(&mut unstructured).unwrap_or_default()
8554    }
8555}
8556impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
8557    fn default() -> Self {
8558        Self::DEFAULT.clone()
8559    }
8560}
8561impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
8562    type Message = MavMessage;
8563    const ID: u32 = 38u32;
8564    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
8565    const EXTRA_CRC: u8 = 9u8;
8566    const ENCODED_LEN: usize = 7usize;
8567    fn deser(
8568        _version: MavlinkVersion,
8569        __input: &[u8],
8570    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8571        let avail_len = __input.len();
8572        let mut payload_buf = [0; Self::ENCODED_LEN];
8573        let mut buf = if avail_len < Self::ENCODED_LEN {
8574            payload_buf[0..avail_len].copy_from_slice(__input);
8575            Bytes::new(&payload_buf)
8576        } else {
8577            Bytes::new(__input)
8578        };
8579        let mut __struct = Self::default();
8580        __struct.start_index = buf.get_i16_le();
8581        __struct.end_index = buf.get_i16_le();
8582        __struct.target_system = buf.get_u8();
8583        __struct.target_component = buf.get_u8();
8584        let tmp = buf.get_u8();
8585        __struct.mission_type =
8586            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8587                enum_type: "MavMissionType",
8588                value: tmp as u32,
8589            })?;
8590        Ok(__struct)
8591    }
8592    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8593        let mut __tmp = BytesMut::new(bytes);
8594        #[allow(clippy::absurd_extreme_comparisons)]
8595        #[allow(unused_comparisons)]
8596        if __tmp.remaining() < Self::ENCODED_LEN {
8597            panic!(
8598                "buffer is too small (need {} bytes, but got {})",
8599                Self::ENCODED_LEN,
8600                __tmp.remaining(),
8601            )
8602        }
8603        __tmp.put_i16_le(self.start_index);
8604        __tmp.put_i16_le(self.end_index);
8605        __tmp.put_u8(self.target_system);
8606        __tmp.put_u8(self.target_component);
8607        __tmp.put_u8(self.mission_type as u8);
8608        if matches!(version, MavlinkVersion::V2) {
8609            let len = __tmp.len();
8610            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8611        } else {
8612            __tmp.len()
8613        }
8614    }
8615}
8616#[doc = "id: 147"]
8617#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
8618#[derive(Debug, Clone, PartialEq)]
8619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8621pub struct BATTERY_STATUS_DATA {
8622    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
8623    pub current_consumed: i32,
8624    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
8625    pub energy_consumed: i32,
8626    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
8627    pub temperature: i16,
8628    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
8629    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8630    pub voltages: [u16; 10],
8631    #[doc = "Battery current, -1: autopilot does not measure the current"]
8632    pub current_battery: i16,
8633    #[doc = "Battery ID"]
8634    pub id: u8,
8635    #[doc = "Function of the battery"]
8636    pub battery_function: MavBatteryFunction,
8637    #[doc = "Type (chemistry) of the battery"]
8638    pub mavtype: MavBatteryType,
8639    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
8640    pub battery_remaining: i8,
8641    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
8642    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8643    pub time_remaining: i32,
8644    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
8645    #[cfg_attr(feature = "serde", serde(default))]
8646    pub charge_state: MavBatteryChargeState,
8647    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
8648    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8649    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8650    pub voltages_ext: [u16; 4],
8651    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
8652    #[cfg_attr(feature = "serde", serde(default))]
8653    pub mode: MavBatteryMode,
8654    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
8655    #[cfg_attr(feature = "serde", serde(default))]
8656    pub fault_bitmask: MavBatteryFault,
8657}
8658impl BATTERY_STATUS_DATA {
8659    pub const ENCODED_LEN: usize = 54usize;
8660    pub const DEFAULT: Self = Self {
8661        current_consumed: 0_i32,
8662        energy_consumed: 0_i32,
8663        temperature: 0_i16,
8664        voltages: [0_u16; 10usize],
8665        current_battery: 0_i16,
8666        id: 0_u8,
8667        battery_function: MavBatteryFunction::DEFAULT,
8668        mavtype: MavBatteryType::DEFAULT,
8669        battery_remaining: 0_i8,
8670        time_remaining: 0_i32,
8671        charge_state: MavBatteryChargeState::DEFAULT,
8672        voltages_ext: [0_u16; 4usize],
8673        mode: MavBatteryMode::DEFAULT,
8674        fault_bitmask: MavBatteryFault::DEFAULT,
8675    };
8676    #[cfg(feature = "arbitrary")]
8677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8678        use arbitrary::{Arbitrary, Unstructured};
8679        let mut buf = [0u8; 1024];
8680        rng.fill_bytes(&mut buf);
8681        let mut unstructured = Unstructured::new(&buf);
8682        Self::arbitrary(&mut unstructured).unwrap_or_default()
8683    }
8684}
8685impl Default for BATTERY_STATUS_DATA {
8686    fn default() -> Self {
8687        Self::DEFAULT.clone()
8688    }
8689}
8690impl MessageData for BATTERY_STATUS_DATA {
8691    type Message = MavMessage;
8692    const ID: u32 = 147u32;
8693    const NAME: &'static str = "BATTERY_STATUS";
8694    const EXTRA_CRC: u8 = 154u8;
8695    const ENCODED_LEN: usize = 54usize;
8696    fn deser(
8697        _version: MavlinkVersion,
8698        __input: &[u8],
8699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8700        let avail_len = __input.len();
8701        let mut payload_buf = [0; Self::ENCODED_LEN];
8702        let mut buf = if avail_len < Self::ENCODED_LEN {
8703            payload_buf[0..avail_len].copy_from_slice(__input);
8704            Bytes::new(&payload_buf)
8705        } else {
8706            Bytes::new(__input)
8707        };
8708        let mut __struct = Self::default();
8709        __struct.current_consumed = buf.get_i32_le();
8710        __struct.energy_consumed = buf.get_i32_le();
8711        __struct.temperature = buf.get_i16_le();
8712        for v in &mut __struct.voltages {
8713            let val = buf.get_u16_le();
8714            *v = val;
8715        }
8716        __struct.current_battery = buf.get_i16_le();
8717        __struct.id = buf.get_u8();
8718        let tmp = buf.get_u8();
8719        __struct.battery_function =
8720            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8721                enum_type: "MavBatteryFunction",
8722                value: tmp as u32,
8723            })?;
8724        let tmp = buf.get_u8();
8725        __struct.mavtype =
8726            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8727                enum_type: "MavBatteryType",
8728                value: tmp as u32,
8729            })?;
8730        __struct.battery_remaining = buf.get_i8();
8731        __struct.time_remaining = buf.get_i32_le();
8732        let tmp = buf.get_u8();
8733        __struct.charge_state =
8734            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8735                enum_type: "MavBatteryChargeState",
8736                value: tmp as u32,
8737            })?;
8738        for v in &mut __struct.voltages_ext {
8739            let val = buf.get_u16_le();
8740            *v = val;
8741        }
8742        let tmp = buf.get_u8();
8743        __struct.mode =
8744            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8745                enum_type: "MavBatteryMode",
8746                value: tmp as u32,
8747            })?;
8748        let tmp = buf.get_u32_le();
8749        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
8750            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8751                flag_type: "MavBatteryFault",
8752                value: tmp as u32,
8753            })?;
8754        Ok(__struct)
8755    }
8756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8757        let mut __tmp = BytesMut::new(bytes);
8758        #[allow(clippy::absurd_extreme_comparisons)]
8759        #[allow(unused_comparisons)]
8760        if __tmp.remaining() < Self::ENCODED_LEN {
8761            panic!(
8762                "buffer is too small (need {} bytes, but got {})",
8763                Self::ENCODED_LEN,
8764                __tmp.remaining(),
8765            )
8766        }
8767        __tmp.put_i32_le(self.current_consumed);
8768        __tmp.put_i32_le(self.energy_consumed);
8769        __tmp.put_i16_le(self.temperature);
8770        for val in &self.voltages {
8771            __tmp.put_u16_le(*val);
8772        }
8773        __tmp.put_i16_le(self.current_battery);
8774        __tmp.put_u8(self.id);
8775        __tmp.put_u8(self.battery_function as u8);
8776        __tmp.put_u8(self.mavtype as u8);
8777        __tmp.put_i8(self.battery_remaining);
8778        __tmp.put_i32_le(self.time_remaining);
8779        __tmp.put_u8(self.charge_state as u8);
8780        for val in &self.voltages_ext {
8781            __tmp.put_u16_le(*val);
8782        }
8783        __tmp.put_u8(self.mode as u8);
8784        __tmp.put_u32_le(self.fault_bitmask.bits());
8785        if matches!(version, MavlinkVersion::V2) {
8786            let len = __tmp.len();
8787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8788        } else {
8789            __tmp.len()
8790        }
8791    }
8792}
8793#[doc = "id: 46"]
8794#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
8795#[derive(Debug, Clone, PartialEq)]
8796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8798pub struct MISSION_ITEM_REACHED_DATA {
8799    #[doc = "Sequence"]
8800    pub seq: u16,
8801}
8802impl MISSION_ITEM_REACHED_DATA {
8803    pub const ENCODED_LEN: usize = 2usize;
8804    pub const DEFAULT: Self = Self { seq: 0_u16 };
8805    #[cfg(feature = "arbitrary")]
8806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8807        use arbitrary::{Arbitrary, Unstructured};
8808        let mut buf = [0u8; 1024];
8809        rng.fill_bytes(&mut buf);
8810        let mut unstructured = Unstructured::new(&buf);
8811        Self::arbitrary(&mut unstructured).unwrap_or_default()
8812    }
8813}
8814impl Default for MISSION_ITEM_REACHED_DATA {
8815    fn default() -> Self {
8816        Self::DEFAULT.clone()
8817    }
8818}
8819impl MessageData for MISSION_ITEM_REACHED_DATA {
8820    type Message = MavMessage;
8821    const ID: u32 = 46u32;
8822    const NAME: &'static str = "MISSION_ITEM_REACHED";
8823    const EXTRA_CRC: u8 = 11u8;
8824    const ENCODED_LEN: usize = 2usize;
8825    fn deser(
8826        _version: MavlinkVersion,
8827        __input: &[u8],
8828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8829        let avail_len = __input.len();
8830        let mut payload_buf = [0; Self::ENCODED_LEN];
8831        let mut buf = if avail_len < Self::ENCODED_LEN {
8832            payload_buf[0..avail_len].copy_from_slice(__input);
8833            Bytes::new(&payload_buf)
8834        } else {
8835            Bytes::new(__input)
8836        };
8837        let mut __struct = Self::default();
8838        __struct.seq = buf.get_u16_le();
8839        Ok(__struct)
8840    }
8841    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8842        let mut __tmp = BytesMut::new(bytes);
8843        #[allow(clippy::absurd_extreme_comparisons)]
8844        #[allow(unused_comparisons)]
8845        if __tmp.remaining() < Self::ENCODED_LEN {
8846            panic!(
8847                "buffer is too small (need {} bytes, but got {})",
8848                Self::ENCODED_LEN,
8849                __tmp.remaining(),
8850            )
8851        }
8852        __tmp.put_u16_le(self.seq);
8853        if matches!(version, MavlinkVersion::V2) {
8854            let len = __tmp.len();
8855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8856        } else {
8857            __tmp.len()
8858        }
8859    }
8860}
8861#[doc = "id: 386"]
8862#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8863#[derive(Debug, Clone, PartialEq)]
8864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8866pub struct CAN_FRAME_DATA {
8867    #[doc = "Frame ID"]
8868    pub id: u32,
8869    #[doc = "System ID."]
8870    pub target_system: u8,
8871    #[doc = "Component ID."]
8872    pub target_component: u8,
8873    #[doc = "Bus number"]
8874    pub bus: u8,
8875    #[doc = "Frame length"]
8876    pub len: u8,
8877    #[doc = "Frame data"]
8878    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8879    pub data: [u8; 8],
8880}
8881impl CAN_FRAME_DATA {
8882    pub const ENCODED_LEN: usize = 16usize;
8883    pub const DEFAULT: Self = Self {
8884        id: 0_u32,
8885        target_system: 0_u8,
8886        target_component: 0_u8,
8887        bus: 0_u8,
8888        len: 0_u8,
8889        data: [0_u8; 8usize],
8890    };
8891    #[cfg(feature = "arbitrary")]
8892    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8893        use arbitrary::{Arbitrary, Unstructured};
8894        let mut buf = [0u8; 1024];
8895        rng.fill_bytes(&mut buf);
8896        let mut unstructured = Unstructured::new(&buf);
8897        Self::arbitrary(&mut unstructured).unwrap_or_default()
8898    }
8899}
8900impl Default for CAN_FRAME_DATA {
8901    fn default() -> Self {
8902        Self::DEFAULT.clone()
8903    }
8904}
8905impl MessageData for CAN_FRAME_DATA {
8906    type Message = MavMessage;
8907    const ID: u32 = 386u32;
8908    const NAME: &'static str = "CAN_FRAME";
8909    const EXTRA_CRC: u8 = 132u8;
8910    const ENCODED_LEN: usize = 16usize;
8911    fn deser(
8912        _version: MavlinkVersion,
8913        __input: &[u8],
8914    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8915        let avail_len = __input.len();
8916        let mut payload_buf = [0; Self::ENCODED_LEN];
8917        let mut buf = if avail_len < Self::ENCODED_LEN {
8918            payload_buf[0..avail_len].copy_from_slice(__input);
8919            Bytes::new(&payload_buf)
8920        } else {
8921            Bytes::new(__input)
8922        };
8923        let mut __struct = Self::default();
8924        __struct.id = buf.get_u32_le();
8925        __struct.target_system = buf.get_u8();
8926        __struct.target_component = buf.get_u8();
8927        __struct.bus = buf.get_u8();
8928        __struct.len = buf.get_u8();
8929        for v in &mut __struct.data {
8930            let val = buf.get_u8();
8931            *v = val;
8932        }
8933        Ok(__struct)
8934    }
8935    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8936        let mut __tmp = BytesMut::new(bytes);
8937        #[allow(clippy::absurd_extreme_comparisons)]
8938        #[allow(unused_comparisons)]
8939        if __tmp.remaining() < Self::ENCODED_LEN {
8940            panic!(
8941                "buffer is too small (need {} bytes, but got {})",
8942                Self::ENCODED_LEN,
8943                __tmp.remaining(),
8944            )
8945        }
8946        __tmp.put_u32_le(self.id);
8947        __tmp.put_u8(self.target_system);
8948        __tmp.put_u8(self.target_component);
8949        __tmp.put_u8(self.bus);
8950        __tmp.put_u8(self.len);
8951        for val in &self.data {
8952            __tmp.put_u8(*val);
8953        }
8954        if matches!(version, MavlinkVersion::V2) {
8955            let len = __tmp.len();
8956            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8957        } else {
8958            __tmp.len()
8959        }
8960    }
8961}
8962#[doc = "id: 248"]
8963#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
8964#[derive(Debug, Clone, PartialEq)]
8965#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8966#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8967pub struct V2_EXTENSION_DATA {
8968    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
8969    pub message_type: u16,
8970    #[doc = "Network ID (0 for broadcast)"]
8971    pub target_network: u8,
8972    #[doc = "System ID (0 for broadcast)"]
8973    pub target_system: u8,
8974    #[doc = "Component ID (0 for broadcast)"]
8975    pub target_component: u8,
8976    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
8977    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8978    pub payload: [u8; 249],
8979}
8980impl V2_EXTENSION_DATA {
8981    pub const ENCODED_LEN: usize = 254usize;
8982    pub const DEFAULT: Self = Self {
8983        message_type: 0_u16,
8984        target_network: 0_u8,
8985        target_system: 0_u8,
8986        target_component: 0_u8,
8987        payload: [0_u8; 249usize],
8988    };
8989    #[cfg(feature = "arbitrary")]
8990    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8991        use arbitrary::{Arbitrary, Unstructured};
8992        let mut buf = [0u8; 1024];
8993        rng.fill_bytes(&mut buf);
8994        let mut unstructured = Unstructured::new(&buf);
8995        Self::arbitrary(&mut unstructured).unwrap_or_default()
8996    }
8997}
8998impl Default for V2_EXTENSION_DATA {
8999    fn default() -> Self {
9000        Self::DEFAULT.clone()
9001    }
9002}
9003impl MessageData for V2_EXTENSION_DATA {
9004    type Message = MavMessage;
9005    const ID: u32 = 248u32;
9006    const NAME: &'static str = "V2_EXTENSION";
9007    const EXTRA_CRC: u8 = 8u8;
9008    const ENCODED_LEN: usize = 254usize;
9009    fn deser(
9010        _version: MavlinkVersion,
9011        __input: &[u8],
9012    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9013        let avail_len = __input.len();
9014        let mut payload_buf = [0; Self::ENCODED_LEN];
9015        let mut buf = if avail_len < Self::ENCODED_LEN {
9016            payload_buf[0..avail_len].copy_from_slice(__input);
9017            Bytes::new(&payload_buf)
9018        } else {
9019            Bytes::new(__input)
9020        };
9021        let mut __struct = Self::default();
9022        __struct.message_type = buf.get_u16_le();
9023        __struct.target_network = buf.get_u8();
9024        __struct.target_system = buf.get_u8();
9025        __struct.target_component = buf.get_u8();
9026        for v in &mut __struct.payload {
9027            let val = buf.get_u8();
9028            *v = val;
9029        }
9030        Ok(__struct)
9031    }
9032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9033        let mut __tmp = BytesMut::new(bytes);
9034        #[allow(clippy::absurd_extreme_comparisons)]
9035        #[allow(unused_comparisons)]
9036        if __tmp.remaining() < Self::ENCODED_LEN {
9037            panic!(
9038                "buffer is too small (need {} bytes, but got {})",
9039                Self::ENCODED_LEN,
9040                __tmp.remaining(),
9041            )
9042        }
9043        __tmp.put_u16_le(self.message_type);
9044        __tmp.put_u8(self.target_network);
9045        __tmp.put_u8(self.target_system);
9046        __tmp.put_u8(self.target_component);
9047        for val in &self.payload {
9048            __tmp.put_u8(*val);
9049        }
9050        if matches!(version, MavlinkVersion::V2) {
9051            let len = __tmp.len();
9052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9053        } else {
9054            __tmp.len()
9055        }
9056    }
9057}
9058#[doc = "id: 411"]
9059#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9060#[derive(Debug, Clone, PartialEq)]
9061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9063pub struct CURRENT_EVENT_SEQUENCE_DATA {
9064    #[doc = "Sequence number."]
9065    pub sequence: u16,
9066    #[doc = "Flag bitset."]
9067    pub flags: MavEventCurrentSequenceFlags,
9068}
9069impl CURRENT_EVENT_SEQUENCE_DATA {
9070    pub const ENCODED_LEN: usize = 3usize;
9071    pub const DEFAULT: Self = Self {
9072        sequence: 0_u16,
9073        flags: MavEventCurrentSequenceFlags::DEFAULT,
9074    };
9075    #[cfg(feature = "arbitrary")]
9076    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9077        use arbitrary::{Arbitrary, Unstructured};
9078        let mut buf = [0u8; 1024];
9079        rng.fill_bytes(&mut buf);
9080        let mut unstructured = Unstructured::new(&buf);
9081        Self::arbitrary(&mut unstructured).unwrap_or_default()
9082    }
9083}
9084impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9085    fn default() -> Self {
9086        Self::DEFAULT.clone()
9087    }
9088}
9089impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9090    type Message = MavMessage;
9091    const ID: u32 = 411u32;
9092    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9093    const EXTRA_CRC: u8 = 106u8;
9094    const ENCODED_LEN: usize = 3usize;
9095    fn deser(
9096        _version: MavlinkVersion,
9097        __input: &[u8],
9098    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9099        let avail_len = __input.len();
9100        let mut payload_buf = [0; Self::ENCODED_LEN];
9101        let mut buf = if avail_len < Self::ENCODED_LEN {
9102            payload_buf[0..avail_len].copy_from_slice(__input);
9103            Bytes::new(&payload_buf)
9104        } else {
9105            Bytes::new(__input)
9106        };
9107        let mut __struct = Self::default();
9108        __struct.sequence = buf.get_u16_le();
9109        let tmp = buf.get_u8();
9110        __struct.flags =
9111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9112                enum_type: "MavEventCurrentSequenceFlags",
9113                value: tmp as u32,
9114            })?;
9115        Ok(__struct)
9116    }
9117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9118        let mut __tmp = BytesMut::new(bytes);
9119        #[allow(clippy::absurd_extreme_comparisons)]
9120        #[allow(unused_comparisons)]
9121        if __tmp.remaining() < Self::ENCODED_LEN {
9122            panic!(
9123                "buffer is too small (need {} bytes, but got {})",
9124                Self::ENCODED_LEN,
9125                __tmp.remaining(),
9126            )
9127        }
9128        __tmp.put_u16_le(self.sequence);
9129        __tmp.put_u8(self.flags as u8);
9130        if matches!(version, MavlinkVersion::V2) {
9131            let len = __tmp.len();
9132            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9133        } else {
9134            __tmp.len()
9135        }
9136    }
9137}
9138#[doc = "id: 413"]
9139#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
9140#[derive(Debug, Clone, PartialEq)]
9141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9143pub struct RESPONSE_EVENT_ERROR_DATA {
9144    #[doc = "Sequence number."]
9145    pub sequence: u16,
9146    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
9147    pub sequence_oldest_available: u16,
9148    #[doc = "System ID"]
9149    pub target_system: u8,
9150    #[doc = "Component ID"]
9151    pub target_component: u8,
9152    #[doc = "Error reason."]
9153    pub reason: MavEventErrorReason,
9154}
9155impl RESPONSE_EVENT_ERROR_DATA {
9156    pub const ENCODED_LEN: usize = 7usize;
9157    pub const DEFAULT: Self = Self {
9158        sequence: 0_u16,
9159        sequence_oldest_available: 0_u16,
9160        target_system: 0_u8,
9161        target_component: 0_u8,
9162        reason: MavEventErrorReason::DEFAULT,
9163    };
9164    #[cfg(feature = "arbitrary")]
9165    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9166        use arbitrary::{Arbitrary, Unstructured};
9167        let mut buf = [0u8; 1024];
9168        rng.fill_bytes(&mut buf);
9169        let mut unstructured = Unstructured::new(&buf);
9170        Self::arbitrary(&mut unstructured).unwrap_or_default()
9171    }
9172}
9173impl Default for RESPONSE_EVENT_ERROR_DATA {
9174    fn default() -> Self {
9175        Self::DEFAULT.clone()
9176    }
9177}
9178impl MessageData for RESPONSE_EVENT_ERROR_DATA {
9179    type Message = MavMessage;
9180    const ID: u32 = 413u32;
9181    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
9182    const EXTRA_CRC: u8 = 77u8;
9183    const ENCODED_LEN: usize = 7usize;
9184    fn deser(
9185        _version: MavlinkVersion,
9186        __input: &[u8],
9187    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9188        let avail_len = __input.len();
9189        let mut payload_buf = [0; Self::ENCODED_LEN];
9190        let mut buf = if avail_len < Self::ENCODED_LEN {
9191            payload_buf[0..avail_len].copy_from_slice(__input);
9192            Bytes::new(&payload_buf)
9193        } else {
9194            Bytes::new(__input)
9195        };
9196        let mut __struct = Self::default();
9197        __struct.sequence = buf.get_u16_le();
9198        __struct.sequence_oldest_available = buf.get_u16_le();
9199        __struct.target_system = buf.get_u8();
9200        __struct.target_component = buf.get_u8();
9201        let tmp = buf.get_u8();
9202        __struct.reason =
9203            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9204                enum_type: "MavEventErrorReason",
9205                value: tmp as u32,
9206            })?;
9207        Ok(__struct)
9208    }
9209    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9210        let mut __tmp = BytesMut::new(bytes);
9211        #[allow(clippy::absurd_extreme_comparisons)]
9212        #[allow(unused_comparisons)]
9213        if __tmp.remaining() < Self::ENCODED_LEN {
9214            panic!(
9215                "buffer is too small (need {} bytes, but got {})",
9216                Self::ENCODED_LEN,
9217                __tmp.remaining(),
9218            )
9219        }
9220        __tmp.put_u16_le(self.sequence);
9221        __tmp.put_u16_le(self.sequence_oldest_available);
9222        __tmp.put_u8(self.target_system);
9223        __tmp.put_u8(self.target_component);
9224        __tmp.put_u8(self.reason as u8);
9225        if matches!(version, MavlinkVersion::V2) {
9226            let len = __tmp.len();
9227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9228        } else {
9229            __tmp.len()
9230        }
9231    }
9232}
9233#[doc = "id: 121"]
9234#[doc = "Erase all logs."]
9235#[derive(Debug, Clone, PartialEq)]
9236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9237#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9238pub struct LOG_ERASE_DATA {
9239    #[doc = "System ID"]
9240    pub target_system: u8,
9241    #[doc = "Component ID"]
9242    pub target_component: u8,
9243}
9244impl LOG_ERASE_DATA {
9245    pub const ENCODED_LEN: usize = 2usize;
9246    pub const DEFAULT: Self = Self {
9247        target_system: 0_u8,
9248        target_component: 0_u8,
9249    };
9250    #[cfg(feature = "arbitrary")]
9251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9252        use arbitrary::{Arbitrary, Unstructured};
9253        let mut buf = [0u8; 1024];
9254        rng.fill_bytes(&mut buf);
9255        let mut unstructured = Unstructured::new(&buf);
9256        Self::arbitrary(&mut unstructured).unwrap_or_default()
9257    }
9258}
9259impl Default for LOG_ERASE_DATA {
9260    fn default() -> Self {
9261        Self::DEFAULT.clone()
9262    }
9263}
9264impl MessageData for LOG_ERASE_DATA {
9265    type Message = MavMessage;
9266    const ID: u32 = 121u32;
9267    const NAME: &'static str = "LOG_ERASE";
9268    const EXTRA_CRC: u8 = 237u8;
9269    const ENCODED_LEN: usize = 2usize;
9270    fn deser(
9271        _version: MavlinkVersion,
9272        __input: &[u8],
9273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9274        let avail_len = __input.len();
9275        let mut payload_buf = [0; Self::ENCODED_LEN];
9276        let mut buf = if avail_len < Self::ENCODED_LEN {
9277            payload_buf[0..avail_len].copy_from_slice(__input);
9278            Bytes::new(&payload_buf)
9279        } else {
9280            Bytes::new(__input)
9281        };
9282        let mut __struct = Self::default();
9283        __struct.target_system = buf.get_u8();
9284        __struct.target_component = buf.get_u8();
9285        Ok(__struct)
9286    }
9287    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9288        let mut __tmp = BytesMut::new(bytes);
9289        #[allow(clippy::absurd_extreme_comparisons)]
9290        #[allow(unused_comparisons)]
9291        if __tmp.remaining() < Self::ENCODED_LEN {
9292            panic!(
9293                "buffer is too small (need {} bytes, but got {})",
9294                Self::ENCODED_LEN,
9295                __tmp.remaining(),
9296            )
9297        }
9298        __tmp.put_u8(self.target_system);
9299        __tmp.put_u8(self.target_component);
9300        if matches!(version, MavlinkVersion::V2) {
9301            let len = __tmp.len();
9302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9303        } else {
9304            __tmp.len()
9305        }
9306    }
9307}
9308#[doc = "id: 440"]
9309#[doc = "Illuminator status."]
9310#[derive(Debug, Clone, PartialEq)]
9311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9313pub struct ILLUMINATOR_STATUS_DATA {
9314    #[doc = "Time since the start-up of the illuminator in ms"]
9315    pub uptime_ms: u32,
9316    #[doc = "Errors"]
9317    pub error_status: IlluminatorErrorFlags,
9318    #[doc = "Illuminator brightness"]
9319    pub brightness: f32,
9320    #[doc = "Illuminator strobing period in seconds"]
9321    pub strobe_period: f32,
9322    #[doc = "Illuminator strobing duty cycle"]
9323    pub strobe_duty_cycle: f32,
9324    #[doc = "Temperature in Celsius"]
9325    pub temp_c: f32,
9326    #[doc = "Minimum strobing period in seconds"]
9327    pub min_strobe_period: f32,
9328    #[doc = "Maximum strobing period in seconds"]
9329    pub max_strobe_period: f32,
9330    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
9331    pub enable: u8,
9332    #[doc = "Supported illuminator modes"]
9333    pub mode_bitmask: IlluminatorMode,
9334    #[doc = "Illuminator mode"]
9335    pub mode: IlluminatorMode,
9336}
9337impl ILLUMINATOR_STATUS_DATA {
9338    pub const ENCODED_LEN: usize = 35usize;
9339    pub const DEFAULT: Self = Self {
9340        uptime_ms: 0_u32,
9341        error_status: IlluminatorErrorFlags::DEFAULT,
9342        brightness: 0.0_f32,
9343        strobe_period: 0.0_f32,
9344        strobe_duty_cycle: 0.0_f32,
9345        temp_c: 0.0_f32,
9346        min_strobe_period: 0.0_f32,
9347        max_strobe_period: 0.0_f32,
9348        enable: 0_u8,
9349        mode_bitmask: IlluminatorMode::DEFAULT,
9350        mode: IlluminatorMode::DEFAULT,
9351    };
9352    #[cfg(feature = "arbitrary")]
9353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9354        use arbitrary::{Arbitrary, Unstructured};
9355        let mut buf = [0u8; 1024];
9356        rng.fill_bytes(&mut buf);
9357        let mut unstructured = Unstructured::new(&buf);
9358        Self::arbitrary(&mut unstructured).unwrap_or_default()
9359    }
9360}
9361impl Default for ILLUMINATOR_STATUS_DATA {
9362    fn default() -> Self {
9363        Self::DEFAULT.clone()
9364    }
9365}
9366impl MessageData for ILLUMINATOR_STATUS_DATA {
9367    type Message = MavMessage;
9368    const ID: u32 = 440u32;
9369    const NAME: &'static str = "ILLUMINATOR_STATUS";
9370    const EXTRA_CRC: u8 = 66u8;
9371    const ENCODED_LEN: usize = 35usize;
9372    fn deser(
9373        _version: MavlinkVersion,
9374        __input: &[u8],
9375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9376        let avail_len = __input.len();
9377        let mut payload_buf = [0; Self::ENCODED_LEN];
9378        let mut buf = if avail_len < Self::ENCODED_LEN {
9379            payload_buf[0..avail_len].copy_from_slice(__input);
9380            Bytes::new(&payload_buf)
9381        } else {
9382            Bytes::new(__input)
9383        };
9384        let mut __struct = Self::default();
9385        __struct.uptime_ms = buf.get_u32_le();
9386        let tmp = buf.get_u32_le();
9387        __struct.error_status = IlluminatorErrorFlags::from_bits(
9388            tmp & IlluminatorErrorFlags::all().bits(),
9389        )
9390        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9391            flag_type: "IlluminatorErrorFlags",
9392            value: tmp as u32,
9393        })?;
9394        __struct.brightness = buf.get_f32_le();
9395        __struct.strobe_period = buf.get_f32_le();
9396        __struct.strobe_duty_cycle = buf.get_f32_le();
9397        __struct.temp_c = buf.get_f32_le();
9398        __struct.min_strobe_period = buf.get_f32_le();
9399        __struct.max_strobe_period = buf.get_f32_le();
9400        __struct.enable = buf.get_u8();
9401        let tmp = buf.get_u8();
9402        __struct.mode_bitmask =
9403            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9404                enum_type: "IlluminatorMode",
9405                value: tmp as u32,
9406            })?;
9407        let tmp = buf.get_u8();
9408        __struct.mode =
9409            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9410                enum_type: "IlluminatorMode",
9411                value: tmp as u32,
9412            })?;
9413        Ok(__struct)
9414    }
9415    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9416        let mut __tmp = BytesMut::new(bytes);
9417        #[allow(clippy::absurd_extreme_comparisons)]
9418        #[allow(unused_comparisons)]
9419        if __tmp.remaining() < Self::ENCODED_LEN {
9420            panic!(
9421                "buffer is too small (need {} bytes, but got {})",
9422                Self::ENCODED_LEN,
9423                __tmp.remaining(),
9424            )
9425        }
9426        __tmp.put_u32_le(self.uptime_ms);
9427        __tmp.put_u32_le(self.error_status.bits());
9428        __tmp.put_f32_le(self.brightness);
9429        __tmp.put_f32_le(self.strobe_period);
9430        __tmp.put_f32_le(self.strobe_duty_cycle);
9431        __tmp.put_f32_le(self.temp_c);
9432        __tmp.put_f32_le(self.min_strobe_period);
9433        __tmp.put_f32_le(self.max_strobe_period);
9434        __tmp.put_u8(self.enable);
9435        __tmp.put_u8(self.mode_bitmask as u8);
9436        __tmp.put_u8(self.mode as u8);
9437        if matches!(version, MavlinkVersion::V2) {
9438            let len = __tmp.len();
9439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9440        } else {
9441            __tmp.len()
9442        }
9443    }
9444}
9445#[doc = "id: 123"]
9446#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
9447#[derive(Debug, Clone, PartialEq)]
9448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9450pub struct GPS_INJECT_DATA_DATA {
9451    #[doc = "System ID"]
9452    pub target_system: u8,
9453    #[doc = "Component ID"]
9454    pub target_component: u8,
9455    #[doc = "Data length"]
9456    pub len: u8,
9457    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
9458    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9459    pub data: [u8; 110],
9460}
9461impl GPS_INJECT_DATA_DATA {
9462    pub const ENCODED_LEN: usize = 113usize;
9463    pub const DEFAULT: Self = Self {
9464        target_system: 0_u8,
9465        target_component: 0_u8,
9466        len: 0_u8,
9467        data: [0_u8; 110usize],
9468    };
9469    #[cfg(feature = "arbitrary")]
9470    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9471        use arbitrary::{Arbitrary, Unstructured};
9472        let mut buf = [0u8; 1024];
9473        rng.fill_bytes(&mut buf);
9474        let mut unstructured = Unstructured::new(&buf);
9475        Self::arbitrary(&mut unstructured).unwrap_or_default()
9476    }
9477}
9478impl Default for GPS_INJECT_DATA_DATA {
9479    fn default() -> Self {
9480        Self::DEFAULT.clone()
9481    }
9482}
9483impl MessageData for GPS_INJECT_DATA_DATA {
9484    type Message = MavMessage;
9485    const ID: u32 = 123u32;
9486    const NAME: &'static str = "GPS_INJECT_DATA";
9487    const EXTRA_CRC: u8 = 250u8;
9488    const ENCODED_LEN: usize = 113usize;
9489    fn deser(
9490        _version: MavlinkVersion,
9491        __input: &[u8],
9492    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9493        let avail_len = __input.len();
9494        let mut payload_buf = [0; Self::ENCODED_LEN];
9495        let mut buf = if avail_len < Self::ENCODED_LEN {
9496            payload_buf[0..avail_len].copy_from_slice(__input);
9497            Bytes::new(&payload_buf)
9498        } else {
9499            Bytes::new(__input)
9500        };
9501        let mut __struct = Self::default();
9502        __struct.target_system = buf.get_u8();
9503        __struct.target_component = buf.get_u8();
9504        __struct.len = buf.get_u8();
9505        for v in &mut __struct.data {
9506            let val = buf.get_u8();
9507            *v = val;
9508        }
9509        Ok(__struct)
9510    }
9511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9512        let mut __tmp = BytesMut::new(bytes);
9513        #[allow(clippy::absurd_extreme_comparisons)]
9514        #[allow(unused_comparisons)]
9515        if __tmp.remaining() < Self::ENCODED_LEN {
9516            panic!(
9517                "buffer is too small (need {} bytes, but got {})",
9518                Self::ENCODED_LEN,
9519                __tmp.remaining(),
9520            )
9521        }
9522        __tmp.put_u8(self.target_system);
9523        __tmp.put_u8(self.target_component);
9524        __tmp.put_u8(self.len);
9525        for val in &self.data {
9526            __tmp.put_u8(*val);
9527        }
9528        if matches!(version, MavlinkVersion::V2) {
9529            let len = __tmp.len();
9530            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9531        } else {
9532            __tmp.len()
9533        }
9534    }
9535}
9536#[doc = "id: 252"]
9537#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
9538#[derive(Debug, Clone, PartialEq)]
9539#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9540#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9541pub struct NAMED_VALUE_INT_DATA {
9542    #[doc = "Timestamp (time since system boot)."]
9543    pub time_boot_ms: u32,
9544    #[doc = "Signed integer value"]
9545    pub value: i32,
9546    #[doc = "Name of the debug variable"]
9547    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9548    pub name: [u8; 10],
9549}
9550impl NAMED_VALUE_INT_DATA {
9551    pub const ENCODED_LEN: usize = 18usize;
9552    pub const DEFAULT: Self = Self {
9553        time_boot_ms: 0_u32,
9554        value: 0_i32,
9555        name: [0_u8; 10usize],
9556    };
9557    #[cfg(feature = "arbitrary")]
9558    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9559        use arbitrary::{Arbitrary, Unstructured};
9560        let mut buf = [0u8; 1024];
9561        rng.fill_bytes(&mut buf);
9562        let mut unstructured = Unstructured::new(&buf);
9563        Self::arbitrary(&mut unstructured).unwrap_or_default()
9564    }
9565}
9566impl Default for NAMED_VALUE_INT_DATA {
9567    fn default() -> Self {
9568        Self::DEFAULT.clone()
9569    }
9570}
9571impl MessageData for NAMED_VALUE_INT_DATA {
9572    type Message = MavMessage;
9573    const ID: u32 = 252u32;
9574    const NAME: &'static str = "NAMED_VALUE_INT";
9575    const EXTRA_CRC: u8 = 44u8;
9576    const ENCODED_LEN: usize = 18usize;
9577    fn deser(
9578        _version: MavlinkVersion,
9579        __input: &[u8],
9580    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9581        let avail_len = __input.len();
9582        let mut payload_buf = [0; Self::ENCODED_LEN];
9583        let mut buf = if avail_len < Self::ENCODED_LEN {
9584            payload_buf[0..avail_len].copy_from_slice(__input);
9585            Bytes::new(&payload_buf)
9586        } else {
9587            Bytes::new(__input)
9588        };
9589        let mut __struct = Self::default();
9590        __struct.time_boot_ms = buf.get_u32_le();
9591        __struct.value = buf.get_i32_le();
9592        for v in &mut __struct.name {
9593            let val = buf.get_u8();
9594            *v = val;
9595        }
9596        Ok(__struct)
9597    }
9598    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9599        let mut __tmp = BytesMut::new(bytes);
9600        #[allow(clippy::absurd_extreme_comparisons)]
9601        #[allow(unused_comparisons)]
9602        if __tmp.remaining() < Self::ENCODED_LEN {
9603            panic!(
9604                "buffer is too small (need {} bytes, but got {})",
9605                Self::ENCODED_LEN,
9606                __tmp.remaining(),
9607            )
9608        }
9609        __tmp.put_u32_le(self.time_boot_ms);
9610        __tmp.put_i32_le(self.value);
9611        for val in &self.name {
9612            __tmp.put_u8(*val);
9613        }
9614        if matches!(version, MavlinkVersion::V2) {
9615            let len = __tmp.len();
9616            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9617        } else {
9618            __tmp.len()
9619        }
9620    }
9621}
9622#[doc = "id: 12920"]
9623#[doc = "Temperature and humidity from hygrometer."]
9624#[derive(Debug, Clone, PartialEq)]
9625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9627pub struct HYGROMETER_SENSOR_DATA {
9628    #[doc = "Temperature"]
9629    pub temperature: i16,
9630    #[doc = "Humidity"]
9631    pub humidity: u16,
9632    #[doc = "Hygrometer ID"]
9633    pub id: u8,
9634}
9635impl HYGROMETER_SENSOR_DATA {
9636    pub const ENCODED_LEN: usize = 5usize;
9637    pub const DEFAULT: Self = Self {
9638        temperature: 0_i16,
9639        humidity: 0_u16,
9640        id: 0_u8,
9641    };
9642    #[cfg(feature = "arbitrary")]
9643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9644        use arbitrary::{Arbitrary, Unstructured};
9645        let mut buf = [0u8; 1024];
9646        rng.fill_bytes(&mut buf);
9647        let mut unstructured = Unstructured::new(&buf);
9648        Self::arbitrary(&mut unstructured).unwrap_or_default()
9649    }
9650}
9651impl Default for HYGROMETER_SENSOR_DATA {
9652    fn default() -> Self {
9653        Self::DEFAULT.clone()
9654    }
9655}
9656impl MessageData for HYGROMETER_SENSOR_DATA {
9657    type Message = MavMessage;
9658    const ID: u32 = 12920u32;
9659    const NAME: &'static str = "HYGROMETER_SENSOR";
9660    const EXTRA_CRC: u8 = 20u8;
9661    const ENCODED_LEN: usize = 5usize;
9662    fn deser(
9663        _version: MavlinkVersion,
9664        __input: &[u8],
9665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9666        let avail_len = __input.len();
9667        let mut payload_buf = [0; Self::ENCODED_LEN];
9668        let mut buf = if avail_len < Self::ENCODED_LEN {
9669            payload_buf[0..avail_len].copy_from_slice(__input);
9670            Bytes::new(&payload_buf)
9671        } else {
9672            Bytes::new(__input)
9673        };
9674        let mut __struct = Self::default();
9675        __struct.temperature = buf.get_i16_le();
9676        __struct.humidity = buf.get_u16_le();
9677        __struct.id = buf.get_u8();
9678        Ok(__struct)
9679    }
9680    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9681        let mut __tmp = BytesMut::new(bytes);
9682        #[allow(clippy::absurd_extreme_comparisons)]
9683        #[allow(unused_comparisons)]
9684        if __tmp.remaining() < Self::ENCODED_LEN {
9685            panic!(
9686                "buffer is too small (need {} bytes, but got {})",
9687                Self::ENCODED_LEN,
9688                __tmp.remaining(),
9689            )
9690        }
9691        __tmp.put_i16_le(self.temperature);
9692        __tmp.put_u16_le(self.humidity);
9693        __tmp.put_u8(self.id);
9694        if matches!(version, MavlinkVersion::V2) {
9695            let len = __tmp.len();
9696            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9697        } else {
9698            __tmp.len()
9699        }
9700    }
9701}
9702#[doc = "id: 74"]
9703#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
9704#[derive(Debug, Clone, PartialEq)]
9705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9707pub struct VFR_HUD_DATA {
9708    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
9709    pub airspeed: f32,
9710    #[doc = "Current ground speed."]
9711    pub groundspeed: f32,
9712    #[doc = "Current altitude (MSL)."]
9713    pub alt: f32,
9714    #[doc = "Current climb rate."]
9715    pub climb: f32,
9716    #[doc = "Current heading in compass units (0-360, 0=north)."]
9717    pub heading: i16,
9718    #[doc = "Current throttle setting (0 to 100)."]
9719    pub throttle: u16,
9720}
9721impl VFR_HUD_DATA {
9722    pub const ENCODED_LEN: usize = 20usize;
9723    pub const DEFAULT: Self = Self {
9724        airspeed: 0.0_f32,
9725        groundspeed: 0.0_f32,
9726        alt: 0.0_f32,
9727        climb: 0.0_f32,
9728        heading: 0_i16,
9729        throttle: 0_u16,
9730    };
9731    #[cfg(feature = "arbitrary")]
9732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9733        use arbitrary::{Arbitrary, Unstructured};
9734        let mut buf = [0u8; 1024];
9735        rng.fill_bytes(&mut buf);
9736        let mut unstructured = Unstructured::new(&buf);
9737        Self::arbitrary(&mut unstructured).unwrap_or_default()
9738    }
9739}
9740impl Default for VFR_HUD_DATA {
9741    fn default() -> Self {
9742        Self::DEFAULT.clone()
9743    }
9744}
9745impl MessageData for VFR_HUD_DATA {
9746    type Message = MavMessage;
9747    const ID: u32 = 74u32;
9748    const NAME: &'static str = "VFR_HUD";
9749    const EXTRA_CRC: u8 = 20u8;
9750    const ENCODED_LEN: usize = 20usize;
9751    fn deser(
9752        _version: MavlinkVersion,
9753        __input: &[u8],
9754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9755        let avail_len = __input.len();
9756        let mut payload_buf = [0; Self::ENCODED_LEN];
9757        let mut buf = if avail_len < Self::ENCODED_LEN {
9758            payload_buf[0..avail_len].copy_from_slice(__input);
9759            Bytes::new(&payload_buf)
9760        } else {
9761            Bytes::new(__input)
9762        };
9763        let mut __struct = Self::default();
9764        __struct.airspeed = buf.get_f32_le();
9765        __struct.groundspeed = buf.get_f32_le();
9766        __struct.alt = buf.get_f32_le();
9767        __struct.climb = buf.get_f32_le();
9768        __struct.heading = buf.get_i16_le();
9769        __struct.throttle = buf.get_u16_le();
9770        Ok(__struct)
9771    }
9772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9773        let mut __tmp = BytesMut::new(bytes);
9774        #[allow(clippy::absurd_extreme_comparisons)]
9775        #[allow(unused_comparisons)]
9776        if __tmp.remaining() < Self::ENCODED_LEN {
9777            panic!(
9778                "buffer is too small (need {} bytes, but got {})",
9779                Self::ENCODED_LEN,
9780                __tmp.remaining(),
9781            )
9782        }
9783        __tmp.put_f32_le(self.airspeed);
9784        __tmp.put_f32_le(self.groundspeed);
9785        __tmp.put_f32_le(self.alt);
9786        __tmp.put_f32_le(self.climb);
9787        __tmp.put_i16_le(self.heading);
9788        __tmp.put_u16_le(self.throttle);
9789        if matches!(version, MavlinkVersion::V2) {
9790            let len = __tmp.len();
9791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9792        } else {
9793            __tmp.len()
9794        }
9795    }
9796}
9797#[doc = "id: 22"]
9798#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
9799#[derive(Debug, Clone, PartialEq)]
9800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9802pub struct PARAM_VALUE_DATA {
9803    #[doc = "Onboard parameter value"]
9804    pub param_value: f32,
9805    #[doc = "Total number of onboard parameters"]
9806    pub param_count: u16,
9807    #[doc = "Index of this onboard parameter"]
9808    pub param_index: u16,
9809    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
9810    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9811    pub param_id: [u8; 16],
9812    #[doc = "Onboard parameter type."]
9813    pub param_type: MavParamType,
9814}
9815impl PARAM_VALUE_DATA {
9816    pub const ENCODED_LEN: usize = 25usize;
9817    pub const DEFAULT: Self = Self {
9818        param_value: 0.0_f32,
9819        param_count: 0_u16,
9820        param_index: 0_u16,
9821        param_id: [0_u8; 16usize],
9822        param_type: MavParamType::DEFAULT,
9823    };
9824    #[cfg(feature = "arbitrary")]
9825    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9826        use arbitrary::{Arbitrary, Unstructured};
9827        let mut buf = [0u8; 1024];
9828        rng.fill_bytes(&mut buf);
9829        let mut unstructured = Unstructured::new(&buf);
9830        Self::arbitrary(&mut unstructured).unwrap_or_default()
9831    }
9832}
9833impl Default for PARAM_VALUE_DATA {
9834    fn default() -> Self {
9835        Self::DEFAULT.clone()
9836    }
9837}
9838impl MessageData for PARAM_VALUE_DATA {
9839    type Message = MavMessage;
9840    const ID: u32 = 22u32;
9841    const NAME: &'static str = "PARAM_VALUE";
9842    const EXTRA_CRC: u8 = 220u8;
9843    const ENCODED_LEN: usize = 25usize;
9844    fn deser(
9845        _version: MavlinkVersion,
9846        __input: &[u8],
9847    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9848        let avail_len = __input.len();
9849        let mut payload_buf = [0; Self::ENCODED_LEN];
9850        let mut buf = if avail_len < Self::ENCODED_LEN {
9851            payload_buf[0..avail_len].copy_from_slice(__input);
9852            Bytes::new(&payload_buf)
9853        } else {
9854            Bytes::new(__input)
9855        };
9856        let mut __struct = Self::default();
9857        __struct.param_value = buf.get_f32_le();
9858        __struct.param_count = buf.get_u16_le();
9859        __struct.param_index = buf.get_u16_le();
9860        for v in &mut __struct.param_id {
9861            let val = buf.get_u8();
9862            *v = val;
9863        }
9864        let tmp = buf.get_u8();
9865        __struct.param_type =
9866            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9867                enum_type: "MavParamType",
9868                value: tmp as u32,
9869            })?;
9870        Ok(__struct)
9871    }
9872    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9873        let mut __tmp = BytesMut::new(bytes);
9874        #[allow(clippy::absurd_extreme_comparisons)]
9875        #[allow(unused_comparisons)]
9876        if __tmp.remaining() < Self::ENCODED_LEN {
9877            panic!(
9878                "buffer is too small (need {} bytes, but got {})",
9879                Self::ENCODED_LEN,
9880                __tmp.remaining(),
9881            )
9882        }
9883        __tmp.put_f32_le(self.param_value);
9884        __tmp.put_u16_le(self.param_count);
9885        __tmp.put_u16_le(self.param_index);
9886        for val in &self.param_id {
9887            __tmp.put_u8(*val);
9888        }
9889        __tmp.put_u8(self.param_type as u8);
9890        if matches!(version, MavlinkVersion::V2) {
9891            let len = __tmp.len();
9892            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9893        } else {
9894            __tmp.len()
9895        }
9896    }
9897}
9898#[doc = "id: 127"]
9899#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
9900#[derive(Debug, Clone, PartialEq)]
9901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9903pub struct GPS_RTK_DATA {
9904    #[doc = "Time since boot of last baseline message received."]
9905    pub time_last_baseline_ms: u32,
9906    #[doc = "GPS Time of Week of last baseline"]
9907    pub tow: u32,
9908    #[doc = "Current baseline in ECEF x or NED north component."]
9909    pub baseline_a_mm: i32,
9910    #[doc = "Current baseline in ECEF y or NED east component."]
9911    pub baseline_b_mm: i32,
9912    #[doc = "Current baseline in ECEF z or NED down component."]
9913    pub baseline_c_mm: i32,
9914    #[doc = "Current estimate of baseline accuracy."]
9915    pub accuracy: u32,
9916    #[doc = "Current number of integer ambiguity hypotheses."]
9917    pub iar_num_hypotheses: i32,
9918    #[doc = "GPS Week Number of last baseline"]
9919    pub wn: u16,
9920    #[doc = "Identification of connected RTK receiver."]
9921    pub rtk_receiver_id: u8,
9922    #[doc = "GPS-specific health report for RTK data."]
9923    pub rtk_health: u8,
9924    #[doc = "Rate of baseline messages being received by GPS"]
9925    pub rtk_rate: u8,
9926    #[doc = "Current number of sats used for RTK calculation."]
9927    pub nsats: u8,
9928    #[doc = "Coordinate system of baseline"]
9929    pub baseline_coords_type: RtkBaselineCoordinateSystem,
9930}
9931impl GPS_RTK_DATA {
9932    pub const ENCODED_LEN: usize = 35usize;
9933    pub const DEFAULT: Self = Self {
9934        time_last_baseline_ms: 0_u32,
9935        tow: 0_u32,
9936        baseline_a_mm: 0_i32,
9937        baseline_b_mm: 0_i32,
9938        baseline_c_mm: 0_i32,
9939        accuracy: 0_u32,
9940        iar_num_hypotheses: 0_i32,
9941        wn: 0_u16,
9942        rtk_receiver_id: 0_u8,
9943        rtk_health: 0_u8,
9944        rtk_rate: 0_u8,
9945        nsats: 0_u8,
9946        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
9947    };
9948    #[cfg(feature = "arbitrary")]
9949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9950        use arbitrary::{Arbitrary, Unstructured};
9951        let mut buf = [0u8; 1024];
9952        rng.fill_bytes(&mut buf);
9953        let mut unstructured = Unstructured::new(&buf);
9954        Self::arbitrary(&mut unstructured).unwrap_or_default()
9955    }
9956}
9957impl Default for GPS_RTK_DATA {
9958    fn default() -> Self {
9959        Self::DEFAULT.clone()
9960    }
9961}
9962impl MessageData for GPS_RTK_DATA {
9963    type Message = MavMessage;
9964    const ID: u32 = 127u32;
9965    const NAME: &'static str = "GPS_RTK";
9966    const EXTRA_CRC: u8 = 25u8;
9967    const ENCODED_LEN: usize = 35usize;
9968    fn deser(
9969        _version: MavlinkVersion,
9970        __input: &[u8],
9971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9972        let avail_len = __input.len();
9973        let mut payload_buf = [0; Self::ENCODED_LEN];
9974        let mut buf = if avail_len < Self::ENCODED_LEN {
9975            payload_buf[0..avail_len].copy_from_slice(__input);
9976            Bytes::new(&payload_buf)
9977        } else {
9978            Bytes::new(__input)
9979        };
9980        let mut __struct = Self::default();
9981        __struct.time_last_baseline_ms = buf.get_u32_le();
9982        __struct.tow = buf.get_u32_le();
9983        __struct.baseline_a_mm = buf.get_i32_le();
9984        __struct.baseline_b_mm = buf.get_i32_le();
9985        __struct.baseline_c_mm = buf.get_i32_le();
9986        __struct.accuracy = buf.get_u32_le();
9987        __struct.iar_num_hypotheses = buf.get_i32_le();
9988        __struct.wn = buf.get_u16_le();
9989        __struct.rtk_receiver_id = buf.get_u8();
9990        __struct.rtk_health = buf.get_u8();
9991        __struct.rtk_rate = buf.get_u8();
9992        __struct.nsats = buf.get_u8();
9993        let tmp = buf.get_u8();
9994        __struct.baseline_coords_type =
9995            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9996                enum_type: "RtkBaselineCoordinateSystem",
9997                value: tmp as u32,
9998            })?;
9999        Ok(__struct)
10000    }
10001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10002        let mut __tmp = BytesMut::new(bytes);
10003        #[allow(clippy::absurd_extreme_comparisons)]
10004        #[allow(unused_comparisons)]
10005        if __tmp.remaining() < Self::ENCODED_LEN {
10006            panic!(
10007                "buffer is too small (need {} bytes, but got {})",
10008                Self::ENCODED_LEN,
10009                __tmp.remaining(),
10010            )
10011        }
10012        __tmp.put_u32_le(self.time_last_baseline_ms);
10013        __tmp.put_u32_le(self.tow);
10014        __tmp.put_i32_le(self.baseline_a_mm);
10015        __tmp.put_i32_le(self.baseline_b_mm);
10016        __tmp.put_i32_le(self.baseline_c_mm);
10017        __tmp.put_u32_le(self.accuracy);
10018        __tmp.put_i32_le(self.iar_num_hypotheses);
10019        __tmp.put_u16_le(self.wn);
10020        __tmp.put_u8(self.rtk_receiver_id);
10021        __tmp.put_u8(self.rtk_health);
10022        __tmp.put_u8(self.rtk_rate);
10023        __tmp.put_u8(self.nsats);
10024        __tmp.put_u8(self.baseline_coords_type as u8);
10025        if matches!(version, MavlinkVersion::V2) {
10026            let len = __tmp.len();
10027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10028        } else {
10029            __tmp.len()
10030        }
10031    }
10032}
10033#[doc = "id: 77"]
10034#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
10035#[derive(Debug, Clone, PartialEq)]
10036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10038pub struct COMMAND_ACK_DATA {
10039    #[doc = "Command ID (of acknowledged command)."]
10040    pub command: MavCmd,
10041    #[doc = "Result of command."]
10042    pub result: MavResult,
10043    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
10044    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10045    pub progress: u8,
10046    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
10047    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10048    pub result_param2: i32,
10049    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
10050    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10051    pub target_system: u8,
10052    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
10053    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10054    pub target_component: u8,
10055}
10056impl COMMAND_ACK_DATA {
10057    pub const ENCODED_LEN: usize = 10usize;
10058    pub const DEFAULT: Self = Self {
10059        command: MavCmd::DEFAULT,
10060        result: MavResult::DEFAULT,
10061        progress: 0_u8,
10062        result_param2: 0_i32,
10063        target_system: 0_u8,
10064        target_component: 0_u8,
10065    };
10066    #[cfg(feature = "arbitrary")]
10067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10068        use arbitrary::{Arbitrary, Unstructured};
10069        let mut buf = [0u8; 1024];
10070        rng.fill_bytes(&mut buf);
10071        let mut unstructured = Unstructured::new(&buf);
10072        Self::arbitrary(&mut unstructured).unwrap_or_default()
10073    }
10074}
10075impl Default for COMMAND_ACK_DATA {
10076    fn default() -> Self {
10077        Self::DEFAULT.clone()
10078    }
10079}
10080impl MessageData for COMMAND_ACK_DATA {
10081    type Message = MavMessage;
10082    const ID: u32 = 77u32;
10083    const NAME: &'static str = "COMMAND_ACK";
10084    const EXTRA_CRC: u8 = 143u8;
10085    const ENCODED_LEN: usize = 10usize;
10086    fn deser(
10087        _version: MavlinkVersion,
10088        __input: &[u8],
10089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10090        let avail_len = __input.len();
10091        let mut payload_buf = [0; Self::ENCODED_LEN];
10092        let mut buf = if avail_len < Self::ENCODED_LEN {
10093            payload_buf[0..avail_len].copy_from_slice(__input);
10094            Bytes::new(&payload_buf)
10095        } else {
10096            Bytes::new(__input)
10097        };
10098        let mut __struct = Self::default();
10099        let tmp = buf.get_u16_le();
10100        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10101            ::mavlink_core::error::ParserError::InvalidEnum {
10102                enum_type: "MavCmd",
10103                value: tmp as u32,
10104            },
10105        )?;
10106        let tmp = buf.get_u8();
10107        __struct.result =
10108            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10109                enum_type: "MavResult",
10110                value: tmp as u32,
10111            })?;
10112        __struct.progress = buf.get_u8();
10113        __struct.result_param2 = buf.get_i32_le();
10114        __struct.target_system = buf.get_u8();
10115        __struct.target_component = buf.get_u8();
10116        Ok(__struct)
10117    }
10118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10119        let mut __tmp = BytesMut::new(bytes);
10120        #[allow(clippy::absurd_extreme_comparisons)]
10121        #[allow(unused_comparisons)]
10122        if __tmp.remaining() < Self::ENCODED_LEN {
10123            panic!(
10124                "buffer is too small (need {} bytes, but got {})",
10125                Self::ENCODED_LEN,
10126                __tmp.remaining(),
10127            )
10128        }
10129        __tmp.put_u16_le(self.command as u16);
10130        __tmp.put_u8(self.result as u8);
10131        __tmp.put_u8(self.progress);
10132        __tmp.put_i32_le(self.result_param2);
10133        __tmp.put_u8(self.target_system);
10134        __tmp.put_u8(self.target_component);
10135        if matches!(version, MavlinkVersion::V2) {
10136            let len = __tmp.len();
10137            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10138        } else {
10139            __tmp.len()
10140        }
10141    }
10142}
10143#[doc = "id: 92"]
10144#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
10145#[derive(Debug, Clone, PartialEq)]
10146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10148pub struct HIL_RC_INPUTS_RAW_DATA {
10149    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10150    pub time_usec: u64,
10151    #[doc = "RC channel 1 value"]
10152    pub chan1_raw: u16,
10153    #[doc = "RC channel 2 value"]
10154    pub chan2_raw: u16,
10155    #[doc = "RC channel 3 value"]
10156    pub chan3_raw: u16,
10157    #[doc = "RC channel 4 value"]
10158    pub chan4_raw: u16,
10159    #[doc = "RC channel 5 value"]
10160    pub chan5_raw: u16,
10161    #[doc = "RC channel 6 value"]
10162    pub chan6_raw: u16,
10163    #[doc = "RC channel 7 value"]
10164    pub chan7_raw: u16,
10165    #[doc = "RC channel 8 value"]
10166    pub chan8_raw: u16,
10167    #[doc = "RC channel 9 value"]
10168    pub chan9_raw: u16,
10169    #[doc = "RC channel 10 value"]
10170    pub chan10_raw: u16,
10171    #[doc = "RC channel 11 value"]
10172    pub chan11_raw: u16,
10173    #[doc = "RC channel 12 value"]
10174    pub chan12_raw: u16,
10175    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
10176    pub rssi: u8,
10177}
10178impl HIL_RC_INPUTS_RAW_DATA {
10179    pub const ENCODED_LEN: usize = 33usize;
10180    pub const DEFAULT: Self = Self {
10181        time_usec: 0_u64,
10182        chan1_raw: 0_u16,
10183        chan2_raw: 0_u16,
10184        chan3_raw: 0_u16,
10185        chan4_raw: 0_u16,
10186        chan5_raw: 0_u16,
10187        chan6_raw: 0_u16,
10188        chan7_raw: 0_u16,
10189        chan8_raw: 0_u16,
10190        chan9_raw: 0_u16,
10191        chan10_raw: 0_u16,
10192        chan11_raw: 0_u16,
10193        chan12_raw: 0_u16,
10194        rssi: 0_u8,
10195    };
10196    #[cfg(feature = "arbitrary")]
10197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10198        use arbitrary::{Arbitrary, Unstructured};
10199        let mut buf = [0u8; 1024];
10200        rng.fill_bytes(&mut buf);
10201        let mut unstructured = Unstructured::new(&buf);
10202        Self::arbitrary(&mut unstructured).unwrap_or_default()
10203    }
10204}
10205impl Default for HIL_RC_INPUTS_RAW_DATA {
10206    fn default() -> Self {
10207        Self::DEFAULT.clone()
10208    }
10209}
10210impl MessageData for HIL_RC_INPUTS_RAW_DATA {
10211    type Message = MavMessage;
10212    const ID: u32 = 92u32;
10213    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
10214    const EXTRA_CRC: u8 = 54u8;
10215    const ENCODED_LEN: usize = 33usize;
10216    fn deser(
10217        _version: MavlinkVersion,
10218        __input: &[u8],
10219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10220        let avail_len = __input.len();
10221        let mut payload_buf = [0; Self::ENCODED_LEN];
10222        let mut buf = if avail_len < Self::ENCODED_LEN {
10223            payload_buf[0..avail_len].copy_from_slice(__input);
10224            Bytes::new(&payload_buf)
10225        } else {
10226            Bytes::new(__input)
10227        };
10228        let mut __struct = Self::default();
10229        __struct.time_usec = buf.get_u64_le();
10230        __struct.chan1_raw = buf.get_u16_le();
10231        __struct.chan2_raw = buf.get_u16_le();
10232        __struct.chan3_raw = buf.get_u16_le();
10233        __struct.chan4_raw = buf.get_u16_le();
10234        __struct.chan5_raw = buf.get_u16_le();
10235        __struct.chan6_raw = buf.get_u16_le();
10236        __struct.chan7_raw = buf.get_u16_le();
10237        __struct.chan8_raw = buf.get_u16_le();
10238        __struct.chan9_raw = buf.get_u16_le();
10239        __struct.chan10_raw = buf.get_u16_le();
10240        __struct.chan11_raw = buf.get_u16_le();
10241        __struct.chan12_raw = buf.get_u16_le();
10242        __struct.rssi = buf.get_u8();
10243        Ok(__struct)
10244    }
10245    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10246        let mut __tmp = BytesMut::new(bytes);
10247        #[allow(clippy::absurd_extreme_comparisons)]
10248        #[allow(unused_comparisons)]
10249        if __tmp.remaining() < Self::ENCODED_LEN {
10250            panic!(
10251                "buffer is too small (need {} bytes, but got {})",
10252                Self::ENCODED_LEN,
10253                __tmp.remaining(),
10254            )
10255        }
10256        __tmp.put_u64_le(self.time_usec);
10257        __tmp.put_u16_le(self.chan1_raw);
10258        __tmp.put_u16_le(self.chan2_raw);
10259        __tmp.put_u16_le(self.chan3_raw);
10260        __tmp.put_u16_le(self.chan4_raw);
10261        __tmp.put_u16_le(self.chan5_raw);
10262        __tmp.put_u16_le(self.chan6_raw);
10263        __tmp.put_u16_le(self.chan7_raw);
10264        __tmp.put_u16_le(self.chan8_raw);
10265        __tmp.put_u16_le(self.chan9_raw);
10266        __tmp.put_u16_le(self.chan10_raw);
10267        __tmp.put_u16_le(self.chan11_raw);
10268        __tmp.put_u16_le(self.chan12_raw);
10269        __tmp.put_u8(self.rssi);
10270        if matches!(version, MavlinkVersion::V2) {
10271            let len = __tmp.len();
10272            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10273        } else {
10274            __tmp.len()
10275        }
10276    }
10277}
10278#[doc = "id: 139"]
10279#[doc = "Set the vehicle attitude and body angular rates."]
10280#[derive(Debug, Clone, PartialEq)]
10281#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10282#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10283pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
10284    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10285    pub time_usec: u64,
10286    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
10287    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10288    pub controls: [f32; 8],
10289    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
10290    pub group_mlx: u8,
10291    #[doc = "System ID"]
10292    pub target_system: u8,
10293    #[doc = "Component ID"]
10294    pub target_component: u8,
10295}
10296impl SET_ACTUATOR_CONTROL_TARGET_DATA {
10297    pub const ENCODED_LEN: usize = 43usize;
10298    pub const DEFAULT: Self = Self {
10299        time_usec: 0_u64,
10300        controls: [0.0_f32; 8usize],
10301        group_mlx: 0_u8,
10302        target_system: 0_u8,
10303        target_component: 0_u8,
10304    };
10305    #[cfg(feature = "arbitrary")]
10306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10307        use arbitrary::{Arbitrary, Unstructured};
10308        let mut buf = [0u8; 1024];
10309        rng.fill_bytes(&mut buf);
10310        let mut unstructured = Unstructured::new(&buf);
10311        Self::arbitrary(&mut unstructured).unwrap_or_default()
10312    }
10313}
10314impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
10315    fn default() -> Self {
10316        Self::DEFAULT.clone()
10317    }
10318}
10319impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
10320    type Message = MavMessage;
10321    const ID: u32 = 139u32;
10322    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
10323    const EXTRA_CRC: u8 = 168u8;
10324    const ENCODED_LEN: usize = 43usize;
10325    fn deser(
10326        _version: MavlinkVersion,
10327        __input: &[u8],
10328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10329        let avail_len = __input.len();
10330        let mut payload_buf = [0; Self::ENCODED_LEN];
10331        let mut buf = if avail_len < Self::ENCODED_LEN {
10332            payload_buf[0..avail_len].copy_from_slice(__input);
10333            Bytes::new(&payload_buf)
10334        } else {
10335            Bytes::new(__input)
10336        };
10337        let mut __struct = Self::default();
10338        __struct.time_usec = buf.get_u64_le();
10339        for v in &mut __struct.controls {
10340            let val = buf.get_f32_le();
10341            *v = val;
10342        }
10343        __struct.group_mlx = buf.get_u8();
10344        __struct.target_system = buf.get_u8();
10345        __struct.target_component = buf.get_u8();
10346        Ok(__struct)
10347    }
10348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10349        let mut __tmp = BytesMut::new(bytes);
10350        #[allow(clippy::absurd_extreme_comparisons)]
10351        #[allow(unused_comparisons)]
10352        if __tmp.remaining() < Self::ENCODED_LEN {
10353            panic!(
10354                "buffer is too small (need {} bytes, but got {})",
10355                Self::ENCODED_LEN,
10356                __tmp.remaining(),
10357            )
10358        }
10359        __tmp.put_u64_le(self.time_usec);
10360        for val in &self.controls {
10361            __tmp.put_f32_le(*val);
10362        }
10363        __tmp.put_u8(self.group_mlx);
10364        __tmp.put_u8(self.target_system);
10365        __tmp.put_u8(self.target_component);
10366        if matches!(version, MavlinkVersion::V2) {
10367            let len = __tmp.len();
10368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10369        } else {
10370            __tmp.len()
10371        }
10372    }
10373}
10374#[doc = "id: 12903"]
10375#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
10376#[derive(Debug, Clone, PartialEq)]
10377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10379pub struct OPEN_DRONE_ID_SELF_ID_DATA {
10380    #[doc = "System ID (0 for broadcast)."]
10381    pub target_system: u8,
10382    #[doc = "Component ID (0 for broadcast)."]
10383    pub target_component: u8,
10384    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
10385    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10386    pub id_or_mac: [u8; 20],
10387    #[doc = "Indicates the type of the description field."]
10388    pub description_type: MavOdidDescType,
10389    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
10390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10391    pub description: [u8; 23],
10392}
10393impl OPEN_DRONE_ID_SELF_ID_DATA {
10394    pub const ENCODED_LEN: usize = 46usize;
10395    pub const DEFAULT: Self = Self {
10396        target_system: 0_u8,
10397        target_component: 0_u8,
10398        id_or_mac: [0_u8; 20usize],
10399        description_type: MavOdidDescType::DEFAULT,
10400        description: [0_u8; 23usize],
10401    };
10402    #[cfg(feature = "arbitrary")]
10403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10404        use arbitrary::{Arbitrary, Unstructured};
10405        let mut buf = [0u8; 1024];
10406        rng.fill_bytes(&mut buf);
10407        let mut unstructured = Unstructured::new(&buf);
10408        Self::arbitrary(&mut unstructured).unwrap_or_default()
10409    }
10410}
10411impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
10412    fn default() -> Self {
10413        Self::DEFAULT.clone()
10414    }
10415}
10416impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
10417    type Message = MavMessage;
10418    const ID: u32 = 12903u32;
10419    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
10420    const EXTRA_CRC: u8 = 249u8;
10421    const ENCODED_LEN: usize = 46usize;
10422    fn deser(
10423        _version: MavlinkVersion,
10424        __input: &[u8],
10425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10426        let avail_len = __input.len();
10427        let mut payload_buf = [0; Self::ENCODED_LEN];
10428        let mut buf = if avail_len < Self::ENCODED_LEN {
10429            payload_buf[0..avail_len].copy_from_slice(__input);
10430            Bytes::new(&payload_buf)
10431        } else {
10432            Bytes::new(__input)
10433        };
10434        let mut __struct = Self::default();
10435        __struct.target_system = buf.get_u8();
10436        __struct.target_component = buf.get_u8();
10437        for v in &mut __struct.id_or_mac {
10438            let val = buf.get_u8();
10439            *v = val;
10440        }
10441        let tmp = buf.get_u8();
10442        __struct.description_type =
10443            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10444                enum_type: "MavOdidDescType",
10445                value: tmp as u32,
10446            })?;
10447        for v in &mut __struct.description {
10448            let val = buf.get_u8();
10449            *v = val;
10450        }
10451        Ok(__struct)
10452    }
10453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10454        let mut __tmp = BytesMut::new(bytes);
10455        #[allow(clippy::absurd_extreme_comparisons)]
10456        #[allow(unused_comparisons)]
10457        if __tmp.remaining() < Self::ENCODED_LEN {
10458            panic!(
10459                "buffer is too small (need {} bytes, but got {})",
10460                Self::ENCODED_LEN,
10461                __tmp.remaining(),
10462            )
10463        }
10464        __tmp.put_u8(self.target_system);
10465        __tmp.put_u8(self.target_component);
10466        for val in &self.id_or_mac {
10467            __tmp.put_u8(*val);
10468        }
10469        __tmp.put_u8(self.description_type as u8);
10470        for val in &self.description {
10471            __tmp.put_u8(*val);
10472        }
10473        if matches!(version, MavlinkVersion::V2) {
10474            let len = __tmp.len();
10475            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10476        } else {
10477            __tmp.len()
10478        }
10479    }
10480}
10481#[doc = "id: 101"]
10482#[doc = "Global position/attitude estimate from a vision source."]
10483#[derive(Debug, Clone, PartialEq)]
10484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10486pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
10487    #[doc = "Timestamp (UNIX time or since system boot)"]
10488    pub usec: u64,
10489    #[doc = "Global X position"]
10490    pub x: f32,
10491    #[doc = "Global Y position"]
10492    pub y: f32,
10493    #[doc = "Global Z position"]
10494    pub z: f32,
10495    #[doc = "Roll angle"]
10496    pub roll: f32,
10497    #[doc = "Pitch angle"]
10498    pub pitch: f32,
10499    #[doc = "Yaw angle"]
10500    pub yaw: f32,
10501    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
10502    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10504    pub covariance: [f32; 21],
10505    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
10506    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10507    pub reset_counter: u8,
10508}
10509impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
10510    pub const ENCODED_LEN: usize = 117usize;
10511    pub const DEFAULT: Self = Self {
10512        usec: 0_u64,
10513        x: 0.0_f32,
10514        y: 0.0_f32,
10515        z: 0.0_f32,
10516        roll: 0.0_f32,
10517        pitch: 0.0_f32,
10518        yaw: 0.0_f32,
10519        covariance: [0.0_f32; 21usize],
10520        reset_counter: 0_u8,
10521    };
10522    #[cfg(feature = "arbitrary")]
10523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10524        use arbitrary::{Arbitrary, Unstructured};
10525        let mut buf = [0u8; 1024];
10526        rng.fill_bytes(&mut buf);
10527        let mut unstructured = Unstructured::new(&buf);
10528        Self::arbitrary(&mut unstructured).unwrap_or_default()
10529    }
10530}
10531impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
10532    fn default() -> Self {
10533        Self::DEFAULT.clone()
10534    }
10535}
10536impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
10537    type Message = MavMessage;
10538    const ID: u32 = 101u32;
10539    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
10540    const EXTRA_CRC: u8 = 102u8;
10541    const ENCODED_LEN: usize = 117usize;
10542    fn deser(
10543        _version: MavlinkVersion,
10544        __input: &[u8],
10545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10546        let avail_len = __input.len();
10547        let mut payload_buf = [0; Self::ENCODED_LEN];
10548        let mut buf = if avail_len < Self::ENCODED_LEN {
10549            payload_buf[0..avail_len].copy_from_slice(__input);
10550            Bytes::new(&payload_buf)
10551        } else {
10552            Bytes::new(__input)
10553        };
10554        let mut __struct = Self::default();
10555        __struct.usec = buf.get_u64_le();
10556        __struct.x = buf.get_f32_le();
10557        __struct.y = buf.get_f32_le();
10558        __struct.z = buf.get_f32_le();
10559        __struct.roll = buf.get_f32_le();
10560        __struct.pitch = buf.get_f32_le();
10561        __struct.yaw = buf.get_f32_le();
10562        for v in &mut __struct.covariance {
10563            let val = buf.get_f32_le();
10564            *v = val;
10565        }
10566        __struct.reset_counter = buf.get_u8();
10567        Ok(__struct)
10568    }
10569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10570        let mut __tmp = BytesMut::new(bytes);
10571        #[allow(clippy::absurd_extreme_comparisons)]
10572        #[allow(unused_comparisons)]
10573        if __tmp.remaining() < Self::ENCODED_LEN {
10574            panic!(
10575                "buffer is too small (need {} bytes, but got {})",
10576                Self::ENCODED_LEN,
10577                __tmp.remaining(),
10578            )
10579        }
10580        __tmp.put_u64_le(self.usec);
10581        __tmp.put_f32_le(self.x);
10582        __tmp.put_f32_le(self.y);
10583        __tmp.put_f32_le(self.z);
10584        __tmp.put_f32_le(self.roll);
10585        __tmp.put_f32_le(self.pitch);
10586        __tmp.put_f32_le(self.yaw);
10587        for val in &self.covariance {
10588            __tmp.put_f32_le(*val);
10589        }
10590        __tmp.put_u8(self.reset_counter);
10591        if matches!(version, MavlinkVersion::V2) {
10592            let len = __tmp.len();
10593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10594        } else {
10595            __tmp.len()
10596        }
10597    }
10598}
10599#[doc = "id: 25"]
10600#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
10601#[derive(Debug, Clone, PartialEq)]
10602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10604pub struct GPS_STATUS_DATA {
10605    #[doc = "Number of satellites visible"]
10606    pub satellites_visible: u8,
10607    #[doc = "Global satellite ID"]
10608    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10609    pub satellite_prn: [u8; 20],
10610    #[doc = "0: Satellite not used, 1: used for localization"]
10611    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10612    pub satellite_used: [u8; 20],
10613    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
10614    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10615    pub satellite_elevation: [u8; 20],
10616    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
10617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10618    pub satellite_azimuth: [u8; 20],
10619    #[doc = "Signal to noise ratio of satellite"]
10620    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10621    pub satellite_snr: [u8; 20],
10622}
10623impl GPS_STATUS_DATA {
10624    pub const ENCODED_LEN: usize = 101usize;
10625    pub const DEFAULT: Self = Self {
10626        satellites_visible: 0_u8,
10627        satellite_prn: [0_u8; 20usize],
10628        satellite_used: [0_u8; 20usize],
10629        satellite_elevation: [0_u8; 20usize],
10630        satellite_azimuth: [0_u8; 20usize],
10631        satellite_snr: [0_u8; 20usize],
10632    };
10633    #[cfg(feature = "arbitrary")]
10634    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10635        use arbitrary::{Arbitrary, Unstructured};
10636        let mut buf = [0u8; 1024];
10637        rng.fill_bytes(&mut buf);
10638        let mut unstructured = Unstructured::new(&buf);
10639        Self::arbitrary(&mut unstructured).unwrap_or_default()
10640    }
10641}
10642impl Default for GPS_STATUS_DATA {
10643    fn default() -> Self {
10644        Self::DEFAULT.clone()
10645    }
10646}
10647impl MessageData for GPS_STATUS_DATA {
10648    type Message = MavMessage;
10649    const ID: u32 = 25u32;
10650    const NAME: &'static str = "GPS_STATUS";
10651    const EXTRA_CRC: u8 = 23u8;
10652    const ENCODED_LEN: usize = 101usize;
10653    fn deser(
10654        _version: MavlinkVersion,
10655        __input: &[u8],
10656    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10657        let avail_len = __input.len();
10658        let mut payload_buf = [0; Self::ENCODED_LEN];
10659        let mut buf = if avail_len < Self::ENCODED_LEN {
10660            payload_buf[0..avail_len].copy_from_slice(__input);
10661            Bytes::new(&payload_buf)
10662        } else {
10663            Bytes::new(__input)
10664        };
10665        let mut __struct = Self::default();
10666        __struct.satellites_visible = buf.get_u8();
10667        for v in &mut __struct.satellite_prn {
10668            let val = buf.get_u8();
10669            *v = val;
10670        }
10671        for v in &mut __struct.satellite_used {
10672            let val = buf.get_u8();
10673            *v = val;
10674        }
10675        for v in &mut __struct.satellite_elevation {
10676            let val = buf.get_u8();
10677            *v = val;
10678        }
10679        for v in &mut __struct.satellite_azimuth {
10680            let val = buf.get_u8();
10681            *v = val;
10682        }
10683        for v in &mut __struct.satellite_snr {
10684            let val = buf.get_u8();
10685            *v = val;
10686        }
10687        Ok(__struct)
10688    }
10689    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10690        let mut __tmp = BytesMut::new(bytes);
10691        #[allow(clippy::absurd_extreme_comparisons)]
10692        #[allow(unused_comparisons)]
10693        if __tmp.remaining() < Self::ENCODED_LEN {
10694            panic!(
10695                "buffer is too small (need {} bytes, but got {})",
10696                Self::ENCODED_LEN,
10697                __tmp.remaining(),
10698            )
10699        }
10700        __tmp.put_u8(self.satellites_visible);
10701        for val in &self.satellite_prn {
10702            __tmp.put_u8(*val);
10703        }
10704        for val in &self.satellite_used {
10705            __tmp.put_u8(*val);
10706        }
10707        for val in &self.satellite_elevation {
10708            __tmp.put_u8(*val);
10709        }
10710        for val in &self.satellite_azimuth {
10711            __tmp.put_u8(*val);
10712        }
10713        for val in &self.satellite_snr {
10714            __tmp.put_u8(*val);
10715        }
10716        if matches!(version, MavlinkVersion::V2) {
10717            let len = __tmp.len();
10718            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10719        } else {
10720            __tmp.len()
10721        }
10722    }
10723}
10724#[doc = "id: 269"]
10725#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
10726#[derive(Debug, Clone, PartialEq)]
10727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10728#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10729pub struct VIDEO_STREAM_INFORMATION_DATA {
10730    #[doc = "Frame rate."]
10731    pub framerate: f32,
10732    #[doc = "Bit rate."]
10733    pub bitrate: u32,
10734    #[doc = "Bitmap of stream status flags."]
10735    pub flags: VideoStreamStatusFlags,
10736    #[doc = "Horizontal resolution."]
10737    pub resolution_h: u16,
10738    #[doc = "Vertical resolution."]
10739    pub resolution_v: u16,
10740    #[doc = "Video image rotation clockwise."]
10741    pub rotation: u16,
10742    #[doc = "Horizontal Field of view."]
10743    pub hfov: u16,
10744    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
10745    pub stream_id: u8,
10746    #[doc = "Number of streams available."]
10747    pub count: u8,
10748    #[doc = "Type of stream."]
10749    pub mavtype: VideoStreamType,
10750    #[doc = "Stream name."]
10751    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10752    pub name: [u8; 32],
10753    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
10754    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10755    pub uri: [u8; 160],
10756    #[doc = "Encoding of stream."]
10757    #[cfg_attr(feature = "serde", serde(default))]
10758    pub encoding: VideoStreamEncoding,
10759    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10760    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10761    pub camera_device_id: u8,
10762}
10763impl VIDEO_STREAM_INFORMATION_DATA {
10764    pub const ENCODED_LEN: usize = 215usize;
10765    pub const DEFAULT: Self = Self {
10766        framerate: 0.0_f32,
10767        bitrate: 0_u32,
10768        flags: VideoStreamStatusFlags::DEFAULT,
10769        resolution_h: 0_u16,
10770        resolution_v: 0_u16,
10771        rotation: 0_u16,
10772        hfov: 0_u16,
10773        stream_id: 0_u8,
10774        count: 0_u8,
10775        mavtype: VideoStreamType::DEFAULT,
10776        name: [0_u8; 32usize],
10777        uri: [0_u8; 160usize],
10778        encoding: VideoStreamEncoding::DEFAULT,
10779        camera_device_id: 0_u8,
10780    };
10781    #[cfg(feature = "arbitrary")]
10782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10783        use arbitrary::{Arbitrary, Unstructured};
10784        let mut buf = [0u8; 1024];
10785        rng.fill_bytes(&mut buf);
10786        let mut unstructured = Unstructured::new(&buf);
10787        Self::arbitrary(&mut unstructured).unwrap_or_default()
10788    }
10789}
10790impl Default for VIDEO_STREAM_INFORMATION_DATA {
10791    fn default() -> Self {
10792        Self::DEFAULT.clone()
10793    }
10794}
10795impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
10796    type Message = MavMessage;
10797    const ID: u32 = 269u32;
10798    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
10799    const EXTRA_CRC: u8 = 109u8;
10800    const ENCODED_LEN: usize = 215usize;
10801    fn deser(
10802        _version: MavlinkVersion,
10803        __input: &[u8],
10804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10805        let avail_len = __input.len();
10806        let mut payload_buf = [0; Self::ENCODED_LEN];
10807        let mut buf = if avail_len < Self::ENCODED_LEN {
10808            payload_buf[0..avail_len].copy_from_slice(__input);
10809            Bytes::new(&payload_buf)
10810        } else {
10811            Bytes::new(__input)
10812        };
10813        let mut __struct = Self::default();
10814        __struct.framerate = buf.get_f32_le();
10815        __struct.bitrate = buf.get_u32_le();
10816        let tmp = buf.get_u16_le();
10817        __struct.flags = VideoStreamStatusFlags::from_bits(
10818            tmp & VideoStreamStatusFlags::all().bits(),
10819        )
10820        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10821            flag_type: "VideoStreamStatusFlags",
10822            value: tmp as u32,
10823        })?;
10824        __struct.resolution_h = buf.get_u16_le();
10825        __struct.resolution_v = buf.get_u16_le();
10826        __struct.rotation = buf.get_u16_le();
10827        __struct.hfov = buf.get_u16_le();
10828        __struct.stream_id = buf.get_u8();
10829        __struct.count = buf.get_u8();
10830        let tmp = buf.get_u8();
10831        __struct.mavtype =
10832            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10833                enum_type: "VideoStreamType",
10834                value: tmp as u32,
10835            })?;
10836        for v in &mut __struct.name {
10837            let val = buf.get_u8();
10838            *v = val;
10839        }
10840        for v in &mut __struct.uri {
10841            let val = buf.get_u8();
10842            *v = val;
10843        }
10844        let tmp = buf.get_u8();
10845        __struct.encoding =
10846            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10847                enum_type: "VideoStreamEncoding",
10848                value: tmp as u32,
10849            })?;
10850        __struct.camera_device_id = buf.get_u8();
10851        Ok(__struct)
10852    }
10853    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10854        let mut __tmp = BytesMut::new(bytes);
10855        #[allow(clippy::absurd_extreme_comparisons)]
10856        #[allow(unused_comparisons)]
10857        if __tmp.remaining() < Self::ENCODED_LEN {
10858            panic!(
10859                "buffer is too small (need {} bytes, but got {})",
10860                Self::ENCODED_LEN,
10861                __tmp.remaining(),
10862            )
10863        }
10864        __tmp.put_f32_le(self.framerate);
10865        __tmp.put_u32_le(self.bitrate);
10866        __tmp.put_u16_le(self.flags.bits());
10867        __tmp.put_u16_le(self.resolution_h);
10868        __tmp.put_u16_le(self.resolution_v);
10869        __tmp.put_u16_le(self.rotation);
10870        __tmp.put_u16_le(self.hfov);
10871        __tmp.put_u8(self.stream_id);
10872        __tmp.put_u8(self.count);
10873        __tmp.put_u8(self.mavtype as u8);
10874        for val in &self.name {
10875            __tmp.put_u8(*val);
10876        }
10877        for val in &self.uri {
10878            __tmp.put_u8(*val);
10879        }
10880        __tmp.put_u8(self.encoding as u8);
10881        __tmp.put_u8(self.camera_device_id);
10882        if matches!(version, MavlinkVersion::V2) {
10883            let len = __tmp.len();
10884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10885        } else {
10886            __tmp.len()
10887        }
10888    }
10889}
10890#[doc = "id: 51"]
10891#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
10892#[derive(Debug, Clone, PartialEq)]
10893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10894#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10895pub struct MISSION_REQUEST_INT_DATA {
10896    #[doc = "Sequence"]
10897    pub seq: u16,
10898    #[doc = "System ID"]
10899    pub target_system: u8,
10900    #[doc = "Component ID"]
10901    pub target_component: u8,
10902    #[doc = "Mission type."]
10903    #[cfg_attr(feature = "serde", serde(default))]
10904    pub mission_type: MavMissionType,
10905}
10906impl MISSION_REQUEST_INT_DATA {
10907    pub const ENCODED_LEN: usize = 5usize;
10908    pub const DEFAULT: Self = Self {
10909        seq: 0_u16,
10910        target_system: 0_u8,
10911        target_component: 0_u8,
10912        mission_type: MavMissionType::DEFAULT,
10913    };
10914    #[cfg(feature = "arbitrary")]
10915    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10916        use arbitrary::{Arbitrary, Unstructured};
10917        let mut buf = [0u8; 1024];
10918        rng.fill_bytes(&mut buf);
10919        let mut unstructured = Unstructured::new(&buf);
10920        Self::arbitrary(&mut unstructured).unwrap_or_default()
10921    }
10922}
10923impl Default for MISSION_REQUEST_INT_DATA {
10924    fn default() -> Self {
10925        Self::DEFAULT.clone()
10926    }
10927}
10928impl MessageData for MISSION_REQUEST_INT_DATA {
10929    type Message = MavMessage;
10930    const ID: u32 = 51u32;
10931    const NAME: &'static str = "MISSION_REQUEST_INT";
10932    const EXTRA_CRC: u8 = 196u8;
10933    const ENCODED_LEN: usize = 5usize;
10934    fn deser(
10935        _version: MavlinkVersion,
10936        __input: &[u8],
10937    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10938        let avail_len = __input.len();
10939        let mut payload_buf = [0; Self::ENCODED_LEN];
10940        let mut buf = if avail_len < Self::ENCODED_LEN {
10941            payload_buf[0..avail_len].copy_from_slice(__input);
10942            Bytes::new(&payload_buf)
10943        } else {
10944            Bytes::new(__input)
10945        };
10946        let mut __struct = Self::default();
10947        __struct.seq = buf.get_u16_le();
10948        __struct.target_system = buf.get_u8();
10949        __struct.target_component = buf.get_u8();
10950        let tmp = buf.get_u8();
10951        __struct.mission_type =
10952            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10953                enum_type: "MavMissionType",
10954                value: tmp as u32,
10955            })?;
10956        Ok(__struct)
10957    }
10958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10959        let mut __tmp = BytesMut::new(bytes);
10960        #[allow(clippy::absurd_extreme_comparisons)]
10961        #[allow(unused_comparisons)]
10962        if __tmp.remaining() < Self::ENCODED_LEN {
10963            panic!(
10964                "buffer is too small (need {} bytes, but got {})",
10965                Self::ENCODED_LEN,
10966                __tmp.remaining(),
10967            )
10968        }
10969        __tmp.put_u16_le(self.seq);
10970        __tmp.put_u8(self.target_system);
10971        __tmp.put_u8(self.target_component);
10972        __tmp.put_u8(self.mission_type as u8);
10973        if matches!(version, MavlinkVersion::V2) {
10974            let len = __tmp.len();
10975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10976        } else {
10977            __tmp.len()
10978        }
10979    }
10980}
10981#[doc = "id: 61"]
10982#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
10983#[derive(Debug, Clone, PartialEq)]
10984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10986pub struct ATTITUDE_QUATERNION_COV_DATA {
10987    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10988    pub time_usec: u64,
10989    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
10990    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10991    pub q: [f32; 4],
10992    #[doc = "Roll angular speed"]
10993    pub rollspeed: f32,
10994    #[doc = "Pitch angular speed"]
10995    pub pitchspeed: f32,
10996    #[doc = "Yaw angular speed"]
10997    pub yawspeed: f32,
10998    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
10999    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11000    pub covariance: [f32; 9],
11001}
11002impl ATTITUDE_QUATERNION_COV_DATA {
11003    pub const ENCODED_LEN: usize = 72usize;
11004    pub const DEFAULT: Self = Self {
11005        time_usec: 0_u64,
11006        q: [0.0_f32; 4usize],
11007        rollspeed: 0.0_f32,
11008        pitchspeed: 0.0_f32,
11009        yawspeed: 0.0_f32,
11010        covariance: [0.0_f32; 9usize],
11011    };
11012    #[cfg(feature = "arbitrary")]
11013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11014        use arbitrary::{Arbitrary, Unstructured};
11015        let mut buf = [0u8; 1024];
11016        rng.fill_bytes(&mut buf);
11017        let mut unstructured = Unstructured::new(&buf);
11018        Self::arbitrary(&mut unstructured).unwrap_or_default()
11019    }
11020}
11021impl Default for ATTITUDE_QUATERNION_COV_DATA {
11022    fn default() -> Self {
11023        Self::DEFAULT.clone()
11024    }
11025}
11026impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
11027    type Message = MavMessage;
11028    const ID: u32 = 61u32;
11029    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
11030    const EXTRA_CRC: u8 = 167u8;
11031    const ENCODED_LEN: usize = 72usize;
11032    fn deser(
11033        _version: MavlinkVersion,
11034        __input: &[u8],
11035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11036        let avail_len = __input.len();
11037        let mut payload_buf = [0; Self::ENCODED_LEN];
11038        let mut buf = if avail_len < Self::ENCODED_LEN {
11039            payload_buf[0..avail_len].copy_from_slice(__input);
11040            Bytes::new(&payload_buf)
11041        } else {
11042            Bytes::new(__input)
11043        };
11044        let mut __struct = Self::default();
11045        __struct.time_usec = buf.get_u64_le();
11046        for v in &mut __struct.q {
11047            let val = buf.get_f32_le();
11048            *v = val;
11049        }
11050        __struct.rollspeed = buf.get_f32_le();
11051        __struct.pitchspeed = buf.get_f32_le();
11052        __struct.yawspeed = buf.get_f32_le();
11053        for v in &mut __struct.covariance {
11054            let val = buf.get_f32_le();
11055            *v = val;
11056        }
11057        Ok(__struct)
11058    }
11059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11060        let mut __tmp = BytesMut::new(bytes);
11061        #[allow(clippy::absurd_extreme_comparisons)]
11062        #[allow(unused_comparisons)]
11063        if __tmp.remaining() < Self::ENCODED_LEN {
11064            panic!(
11065                "buffer is too small (need {} bytes, but got {})",
11066                Self::ENCODED_LEN,
11067                __tmp.remaining(),
11068            )
11069        }
11070        __tmp.put_u64_le(self.time_usec);
11071        for val in &self.q {
11072            __tmp.put_f32_le(*val);
11073        }
11074        __tmp.put_f32_le(self.rollspeed);
11075        __tmp.put_f32_le(self.pitchspeed);
11076        __tmp.put_f32_le(self.yawspeed);
11077        for val in &self.covariance {
11078            __tmp.put_f32_le(*val);
11079        }
11080        if matches!(version, MavlinkVersion::V2) {
11081            let len = __tmp.len();
11082            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11083        } else {
11084            __tmp.len()
11085        }
11086    }
11087}
11088#[doc = "id: 250"]
11089#[doc = "To debug something using a named 3D vector."]
11090#[derive(Debug, Clone, PartialEq)]
11091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11092#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11093pub struct DEBUG_VECT_DATA {
11094    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11095    pub time_usec: u64,
11096    #[doc = "x"]
11097    pub x: f32,
11098    #[doc = "y"]
11099    pub y: f32,
11100    #[doc = "z"]
11101    pub z: f32,
11102    #[doc = "Name"]
11103    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11104    pub name: [u8; 10],
11105}
11106impl DEBUG_VECT_DATA {
11107    pub const ENCODED_LEN: usize = 30usize;
11108    pub const DEFAULT: Self = Self {
11109        time_usec: 0_u64,
11110        x: 0.0_f32,
11111        y: 0.0_f32,
11112        z: 0.0_f32,
11113        name: [0_u8; 10usize],
11114    };
11115    #[cfg(feature = "arbitrary")]
11116    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11117        use arbitrary::{Arbitrary, Unstructured};
11118        let mut buf = [0u8; 1024];
11119        rng.fill_bytes(&mut buf);
11120        let mut unstructured = Unstructured::new(&buf);
11121        Self::arbitrary(&mut unstructured).unwrap_or_default()
11122    }
11123}
11124impl Default for DEBUG_VECT_DATA {
11125    fn default() -> Self {
11126        Self::DEFAULT.clone()
11127    }
11128}
11129impl MessageData for DEBUG_VECT_DATA {
11130    type Message = MavMessage;
11131    const ID: u32 = 250u32;
11132    const NAME: &'static str = "DEBUG_VECT";
11133    const EXTRA_CRC: u8 = 49u8;
11134    const ENCODED_LEN: usize = 30usize;
11135    fn deser(
11136        _version: MavlinkVersion,
11137        __input: &[u8],
11138    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11139        let avail_len = __input.len();
11140        let mut payload_buf = [0; Self::ENCODED_LEN];
11141        let mut buf = if avail_len < Self::ENCODED_LEN {
11142            payload_buf[0..avail_len].copy_from_slice(__input);
11143            Bytes::new(&payload_buf)
11144        } else {
11145            Bytes::new(__input)
11146        };
11147        let mut __struct = Self::default();
11148        __struct.time_usec = buf.get_u64_le();
11149        __struct.x = buf.get_f32_le();
11150        __struct.y = buf.get_f32_le();
11151        __struct.z = buf.get_f32_le();
11152        for v in &mut __struct.name {
11153            let val = buf.get_u8();
11154            *v = val;
11155        }
11156        Ok(__struct)
11157    }
11158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11159        let mut __tmp = BytesMut::new(bytes);
11160        #[allow(clippy::absurd_extreme_comparisons)]
11161        #[allow(unused_comparisons)]
11162        if __tmp.remaining() < Self::ENCODED_LEN {
11163            panic!(
11164                "buffer is too small (need {} bytes, but got {})",
11165                Self::ENCODED_LEN,
11166                __tmp.remaining(),
11167            )
11168        }
11169        __tmp.put_u64_le(self.time_usec);
11170        __tmp.put_f32_le(self.x);
11171        __tmp.put_f32_le(self.y);
11172        __tmp.put_f32_le(self.z);
11173        for val in &self.name {
11174            __tmp.put_u8(*val);
11175        }
11176        if matches!(version, MavlinkVersion::V2) {
11177            let len = __tmp.len();
11178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11179        } else {
11180            __tmp.len()
11181        }
11182    }
11183}
11184#[doc = "id: 283"]
11185#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
11186#[derive(Debug, Clone, PartialEq)]
11187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11189pub struct GIMBAL_DEVICE_INFORMATION_DATA {
11190    #[doc = "UID of gimbal hardware (0 if unknown)."]
11191    pub uid: u64,
11192    #[doc = "Timestamp (time since system boot)."]
11193    pub time_boot_ms: u32,
11194    #[doc = "0xff)."]
11195    pub firmware_version: u32,
11196    #[doc = "0xff)."]
11197    pub hardware_version: u32,
11198    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
11199    pub roll_min: f32,
11200    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
11201    pub roll_max: f32,
11202    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
11203    pub pitch_min: f32,
11204    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
11205    pub pitch_max: f32,
11206    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
11207    pub yaw_min: f32,
11208    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
11209    pub yaw_max: f32,
11210    #[doc = "Bitmap of gimbal capability flags."]
11211    pub cap_flags: GimbalDeviceCapFlags,
11212    #[doc = "Bitmap for use for gimbal-specific capability flags."]
11213    pub custom_cap_flags: u16,
11214    #[doc = "Name of the gimbal vendor."]
11215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11216    pub vendor_name: [u8; 32],
11217    #[doc = "Name of the gimbal model."]
11218    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11219    pub model_name: [u8; 32],
11220    #[doc = "Custom name of the gimbal given to it by the user."]
11221    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11222    pub custom_name: [u8; 32],
11223    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
11224    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11225    pub gimbal_device_id: u8,
11226}
11227impl GIMBAL_DEVICE_INFORMATION_DATA {
11228    pub const ENCODED_LEN: usize = 145usize;
11229    pub const DEFAULT: Self = Self {
11230        uid: 0_u64,
11231        time_boot_ms: 0_u32,
11232        firmware_version: 0_u32,
11233        hardware_version: 0_u32,
11234        roll_min: 0.0_f32,
11235        roll_max: 0.0_f32,
11236        pitch_min: 0.0_f32,
11237        pitch_max: 0.0_f32,
11238        yaw_min: 0.0_f32,
11239        yaw_max: 0.0_f32,
11240        cap_flags: GimbalDeviceCapFlags::DEFAULT,
11241        custom_cap_flags: 0_u16,
11242        vendor_name: [0_u8; 32usize],
11243        model_name: [0_u8; 32usize],
11244        custom_name: [0_u8; 32usize],
11245        gimbal_device_id: 0_u8,
11246    };
11247    #[cfg(feature = "arbitrary")]
11248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11249        use arbitrary::{Arbitrary, Unstructured};
11250        let mut buf = [0u8; 1024];
11251        rng.fill_bytes(&mut buf);
11252        let mut unstructured = Unstructured::new(&buf);
11253        Self::arbitrary(&mut unstructured).unwrap_or_default()
11254    }
11255}
11256impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
11257    fn default() -> Self {
11258        Self::DEFAULT.clone()
11259    }
11260}
11261impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
11262    type Message = MavMessage;
11263    const ID: u32 = 283u32;
11264    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
11265    const EXTRA_CRC: u8 = 74u8;
11266    const ENCODED_LEN: usize = 145usize;
11267    fn deser(
11268        _version: MavlinkVersion,
11269        __input: &[u8],
11270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11271        let avail_len = __input.len();
11272        let mut payload_buf = [0; Self::ENCODED_LEN];
11273        let mut buf = if avail_len < Self::ENCODED_LEN {
11274            payload_buf[0..avail_len].copy_from_slice(__input);
11275            Bytes::new(&payload_buf)
11276        } else {
11277            Bytes::new(__input)
11278        };
11279        let mut __struct = Self::default();
11280        __struct.uid = buf.get_u64_le();
11281        __struct.time_boot_ms = buf.get_u32_le();
11282        __struct.firmware_version = buf.get_u32_le();
11283        __struct.hardware_version = buf.get_u32_le();
11284        __struct.roll_min = buf.get_f32_le();
11285        __struct.roll_max = buf.get_f32_le();
11286        __struct.pitch_min = buf.get_f32_le();
11287        __struct.pitch_max = buf.get_f32_le();
11288        __struct.yaw_min = buf.get_f32_le();
11289        __struct.yaw_max = buf.get_f32_le();
11290        let tmp = buf.get_u16_le();
11291        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
11292            tmp & GimbalDeviceCapFlags::all().bits(),
11293        )
11294        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11295            flag_type: "GimbalDeviceCapFlags",
11296            value: tmp as u32,
11297        })?;
11298        __struct.custom_cap_flags = buf.get_u16_le();
11299        for v in &mut __struct.vendor_name {
11300            let val = buf.get_u8();
11301            *v = val;
11302        }
11303        for v in &mut __struct.model_name {
11304            let val = buf.get_u8();
11305            *v = val;
11306        }
11307        for v in &mut __struct.custom_name {
11308            let val = buf.get_u8();
11309            *v = val;
11310        }
11311        __struct.gimbal_device_id = buf.get_u8();
11312        Ok(__struct)
11313    }
11314    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11315        let mut __tmp = BytesMut::new(bytes);
11316        #[allow(clippy::absurd_extreme_comparisons)]
11317        #[allow(unused_comparisons)]
11318        if __tmp.remaining() < Self::ENCODED_LEN {
11319            panic!(
11320                "buffer is too small (need {} bytes, but got {})",
11321                Self::ENCODED_LEN,
11322                __tmp.remaining(),
11323            )
11324        }
11325        __tmp.put_u64_le(self.uid);
11326        __tmp.put_u32_le(self.time_boot_ms);
11327        __tmp.put_u32_le(self.firmware_version);
11328        __tmp.put_u32_le(self.hardware_version);
11329        __tmp.put_f32_le(self.roll_min);
11330        __tmp.put_f32_le(self.roll_max);
11331        __tmp.put_f32_le(self.pitch_min);
11332        __tmp.put_f32_le(self.pitch_max);
11333        __tmp.put_f32_le(self.yaw_min);
11334        __tmp.put_f32_le(self.yaw_max);
11335        __tmp.put_u16_le(self.cap_flags.bits());
11336        __tmp.put_u16_le(self.custom_cap_flags);
11337        for val in &self.vendor_name {
11338            __tmp.put_u8(*val);
11339        }
11340        for val in &self.model_name {
11341            __tmp.put_u8(*val);
11342        }
11343        for val in &self.custom_name {
11344            __tmp.put_u8(*val);
11345        }
11346        __tmp.put_u8(self.gimbal_device_id);
11347        if matches!(version, MavlinkVersion::V2) {
11348            let len = __tmp.len();
11349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11350        } else {
11351            __tmp.len()
11352        }
11353    }
11354}
11355#[doc = "id: 397"]
11356#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
11357#[derive(Debug, Clone, PartialEq)]
11358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11360pub struct COMPONENT_METADATA_DATA {
11361    #[doc = "Timestamp (time since system boot)."]
11362    pub time_boot_ms: u32,
11363    #[doc = "CRC32 of the general metadata file."]
11364    pub file_crc: u32,
11365    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
11366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11367    pub uri: [u8; 100],
11368}
11369impl COMPONENT_METADATA_DATA {
11370    pub const ENCODED_LEN: usize = 108usize;
11371    pub const DEFAULT: Self = Self {
11372        time_boot_ms: 0_u32,
11373        file_crc: 0_u32,
11374        uri: [0_u8; 100usize],
11375    };
11376    #[cfg(feature = "arbitrary")]
11377    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11378        use arbitrary::{Arbitrary, Unstructured};
11379        let mut buf = [0u8; 1024];
11380        rng.fill_bytes(&mut buf);
11381        let mut unstructured = Unstructured::new(&buf);
11382        Self::arbitrary(&mut unstructured).unwrap_or_default()
11383    }
11384}
11385impl Default for COMPONENT_METADATA_DATA {
11386    fn default() -> Self {
11387        Self::DEFAULT.clone()
11388    }
11389}
11390impl MessageData for COMPONENT_METADATA_DATA {
11391    type Message = MavMessage;
11392    const ID: u32 = 397u32;
11393    const NAME: &'static str = "COMPONENT_METADATA";
11394    const EXTRA_CRC: u8 = 182u8;
11395    const ENCODED_LEN: usize = 108usize;
11396    fn deser(
11397        _version: MavlinkVersion,
11398        __input: &[u8],
11399    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11400        let avail_len = __input.len();
11401        let mut payload_buf = [0; Self::ENCODED_LEN];
11402        let mut buf = if avail_len < Self::ENCODED_LEN {
11403            payload_buf[0..avail_len].copy_from_slice(__input);
11404            Bytes::new(&payload_buf)
11405        } else {
11406            Bytes::new(__input)
11407        };
11408        let mut __struct = Self::default();
11409        __struct.time_boot_ms = buf.get_u32_le();
11410        __struct.file_crc = buf.get_u32_le();
11411        for v in &mut __struct.uri {
11412            let val = buf.get_u8();
11413            *v = val;
11414        }
11415        Ok(__struct)
11416    }
11417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11418        let mut __tmp = BytesMut::new(bytes);
11419        #[allow(clippy::absurd_extreme_comparisons)]
11420        #[allow(unused_comparisons)]
11421        if __tmp.remaining() < Self::ENCODED_LEN {
11422            panic!(
11423                "buffer is too small (need {} bytes, but got {})",
11424                Self::ENCODED_LEN,
11425                __tmp.remaining(),
11426            )
11427        }
11428        __tmp.put_u32_le(self.time_boot_ms);
11429        __tmp.put_u32_le(self.file_crc);
11430        for val in &self.uri {
11431            __tmp.put_u8(*val);
11432        }
11433        if matches!(version, MavlinkVersion::V2) {
11434            let len = __tmp.len();
11435            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11436        } else {
11437            __tmp.len()
11438        }
11439    }
11440}
11441#[doc = "id: 42"]
11442#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
11443#[derive(Debug, Clone, PartialEq)]
11444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11446pub struct MISSION_CURRENT_DATA {
11447    #[doc = "Sequence"]
11448    pub seq: u16,
11449    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
11450    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11451    pub total: u16,
11452    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
11453    #[cfg_attr(feature = "serde", serde(default))]
11454    pub mission_state: MissionState,
11455    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
11456    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11457    pub mission_mode: u8,
11458    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
11459    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11460    pub mission_id: u32,
11461    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
11462    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11463    pub fence_id: u32,
11464    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
11465    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11466    pub rally_points_id: u32,
11467}
11468impl MISSION_CURRENT_DATA {
11469    pub const ENCODED_LEN: usize = 18usize;
11470    pub const DEFAULT: Self = Self {
11471        seq: 0_u16,
11472        total: 0_u16,
11473        mission_state: MissionState::DEFAULT,
11474        mission_mode: 0_u8,
11475        mission_id: 0_u32,
11476        fence_id: 0_u32,
11477        rally_points_id: 0_u32,
11478    };
11479    #[cfg(feature = "arbitrary")]
11480    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11481        use arbitrary::{Arbitrary, Unstructured};
11482        let mut buf = [0u8; 1024];
11483        rng.fill_bytes(&mut buf);
11484        let mut unstructured = Unstructured::new(&buf);
11485        Self::arbitrary(&mut unstructured).unwrap_or_default()
11486    }
11487}
11488impl Default for MISSION_CURRENT_DATA {
11489    fn default() -> Self {
11490        Self::DEFAULT.clone()
11491    }
11492}
11493impl MessageData for MISSION_CURRENT_DATA {
11494    type Message = MavMessage;
11495    const ID: u32 = 42u32;
11496    const NAME: &'static str = "MISSION_CURRENT";
11497    const EXTRA_CRC: u8 = 28u8;
11498    const ENCODED_LEN: usize = 18usize;
11499    fn deser(
11500        _version: MavlinkVersion,
11501        __input: &[u8],
11502    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11503        let avail_len = __input.len();
11504        let mut payload_buf = [0; Self::ENCODED_LEN];
11505        let mut buf = if avail_len < Self::ENCODED_LEN {
11506            payload_buf[0..avail_len].copy_from_slice(__input);
11507            Bytes::new(&payload_buf)
11508        } else {
11509            Bytes::new(__input)
11510        };
11511        let mut __struct = Self::default();
11512        __struct.seq = buf.get_u16_le();
11513        __struct.total = buf.get_u16_le();
11514        let tmp = buf.get_u8();
11515        __struct.mission_state =
11516            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11517                enum_type: "MissionState",
11518                value: tmp as u32,
11519            })?;
11520        __struct.mission_mode = buf.get_u8();
11521        __struct.mission_id = buf.get_u32_le();
11522        __struct.fence_id = buf.get_u32_le();
11523        __struct.rally_points_id = buf.get_u32_le();
11524        Ok(__struct)
11525    }
11526    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11527        let mut __tmp = BytesMut::new(bytes);
11528        #[allow(clippy::absurd_extreme_comparisons)]
11529        #[allow(unused_comparisons)]
11530        if __tmp.remaining() < Self::ENCODED_LEN {
11531            panic!(
11532                "buffer is too small (need {} bytes, but got {})",
11533                Self::ENCODED_LEN,
11534                __tmp.remaining(),
11535            )
11536        }
11537        __tmp.put_u16_le(self.seq);
11538        __tmp.put_u16_le(self.total);
11539        __tmp.put_u8(self.mission_state as u8);
11540        __tmp.put_u8(self.mission_mode);
11541        __tmp.put_u32_le(self.mission_id);
11542        __tmp.put_u32_le(self.fence_id);
11543        __tmp.put_u32_le(self.rally_points_id);
11544        if matches!(version, MavlinkVersion::V2) {
11545            let len = __tmp.len();
11546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11547        } else {
11548            __tmp.len()
11549        }
11550    }
11551}
11552#[doc = "id: 265"]
11553#[doc = "Orientation of a mount."]
11554#[derive(Debug, Clone, PartialEq)]
11555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11557pub struct MOUNT_ORIENTATION_DATA {
11558    #[doc = "Timestamp (time since system boot)."]
11559    pub time_boot_ms: u32,
11560    #[doc = "Roll in global frame (set to NaN for invalid)."]
11561    pub roll: f32,
11562    #[doc = "Pitch in global frame (set to NaN for invalid)."]
11563    pub pitch: f32,
11564    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
11565    pub yaw: f32,
11566    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
11567    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11568    pub yaw_absolute: f32,
11569}
11570impl MOUNT_ORIENTATION_DATA {
11571    pub const ENCODED_LEN: usize = 20usize;
11572    pub const DEFAULT: Self = Self {
11573        time_boot_ms: 0_u32,
11574        roll: 0.0_f32,
11575        pitch: 0.0_f32,
11576        yaw: 0.0_f32,
11577        yaw_absolute: 0.0_f32,
11578    };
11579    #[cfg(feature = "arbitrary")]
11580    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11581        use arbitrary::{Arbitrary, Unstructured};
11582        let mut buf = [0u8; 1024];
11583        rng.fill_bytes(&mut buf);
11584        let mut unstructured = Unstructured::new(&buf);
11585        Self::arbitrary(&mut unstructured).unwrap_or_default()
11586    }
11587}
11588impl Default for MOUNT_ORIENTATION_DATA {
11589    fn default() -> Self {
11590        Self::DEFAULT.clone()
11591    }
11592}
11593impl MessageData for MOUNT_ORIENTATION_DATA {
11594    type Message = MavMessage;
11595    const ID: u32 = 265u32;
11596    const NAME: &'static str = "MOUNT_ORIENTATION";
11597    const EXTRA_CRC: u8 = 26u8;
11598    const ENCODED_LEN: usize = 20usize;
11599    fn deser(
11600        _version: MavlinkVersion,
11601        __input: &[u8],
11602    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11603        let avail_len = __input.len();
11604        let mut payload_buf = [0; Self::ENCODED_LEN];
11605        let mut buf = if avail_len < Self::ENCODED_LEN {
11606            payload_buf[0..avail_len].copy_from_slice(__input);
11607            Bytes::new(&payload_buf)
11608        } else {
11609            Bytes::new(__input)
11610        };
11611        let mut __struct = Self::default();
11612        __struct.time_boot_ms = buf.get_u32_le();
11613        __struct.roll = buf.get_f32_le();
11614        __struct.pitch = buf.get_f32_le();
11615        __struct.yaw = buf.get_f32_le();
11616        __struct.yaw_absolute = buf.get_f32_le();
11617        Ok(__struct)
11618    }
11619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11620        let mut __tmp = BytesMut::new(bytes);
11621        #[allow(clippy::absurd_extreme_comparisons)]
11622        #[allow(unused_comparisons)]
11623        if __tmp.remaining() < Self::ENCODED_LEN {
11624            panic!(
11625                "buffer is too small (need {} bytes, but got {})",
11626                Self::ENCODED_LEN,
11627                __tmp.remaining(),
11628            )
11629        }
11630        __tmp.put_u32_le(self.time_boot_ms);
11631        __tmp.put_f32_le(self.roll);
11632        __tmp.put_f32_le(self.pitch);
11633        __tmp.put_f32_le(self.yaw);
11634        __tmp.put_f32_le(self.yaw_absolute);
11635        if matches!(version, MavlinkVersion::V2) {
11636            let len = __tmp.len();
11637            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11638        } else {
11639            __tmp.len()
11640        }
11641    }
11642}
11643#[doc = "id: 137"]
11644#[doc = "Barometer readings for 2nd barometer."]
11645#[derive(Debug, Clone, PartialEq)]
11646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11647#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11648pub struct SCALED_PRESSURE2_DATA {
11649    #[doc = "Timestamp (time since system boot)."]
11650    pub time_boot_ms: u32,
11651    #[doc = "Absolute pressure"]
11652    pub press_abs: f32,
11653    #[doc = "Differential pressure"]
11654    pub press_diff: f32,
11655    #[doc = "Absolute pressure temperature"]
11656    pub temperature: i16,
11657    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
11658    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11659    pub temperature_press_diff: i16,
11660}
11661impl SCALED_PRESSURE2_DATA {
11662    pub const ENCODED_LEN: usize = 16usize;
11663    pub const DEFAULT: Self = Self {
11664        time_boot_ms: 0_u32,
11665        press_abs: 0.0_f32,
11666        press_diff: 0.0_f32,
11667        temperature: 0_i16,
11668        temperature_press_diff: 0_i16,
11669    };
11670    #[cfg(feature = "arbitrary")]
11671    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11672        use arbitrary::{Arbitrary, Unstructured};
11673        let mut buf = [0u8; 1024];
11674        rng.fill_bytes(&mut buf);
11675        let mut unstructured = Unstructured::new(&buf);
11676        Self::arbitrary(&mut unstructured).unwrap_or_default()
11677    }
11678}
11679impl Default for SCALED_PRESSURE2_DATA {
11680    fn default() -> Self {
11681        Self::DEFAULT.clone()
11682    }
11683}
11684impl MessageData for SCALED_PRESSURE2_DATA {
11685    type Message = MavMessage;
11686    const ID: u32 = 137u32;
11687    const NAME: &'static str = "SCALED_PRESSURE2";
11688    const EXTRA_CRC: u8 = 195u8;
11689    const ENCODED_LEN: usize = 16usize;
11690    fn deser(
11691        _version: MavlinkVersion,
11692        __input: &[u8],
11693    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11694        let avail_len = __input.len();
11695        let mut payload_buf = [0; Self::ENCODED_LEN];
11696        let mut buf = if avail_len < Self::ENCODED_LEN {
11697            payload_buf[0..avail_len].copy_from_slice(__input);
11698            Bytes::new(&payload_buf)
11699        } else {
11700            Bytes::new(__input)
11701        };
11702        let mut __struct = Self::default();
11703        __struct.time_boot_ms = buf.get_u32_le();
11704        __struct.press_abs = buf.get_f32_le();
11705        __struct.press_diff = buf.get_f32_le();
11706        __struct.temperature = buf.get_i16_le();
11707        __struct.temperature_press_diff = buf.get_i16_le();
11708        Ok(__struct)
11709    }
11710    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11711        let mut __tmp = BytesMut::new(bytes);
11712        #[allow(clippy::absurd_extreme_comparisons)]
11713        #[allow(unused_comparisons)]
11714        if __tmp.remaining() < Self::ENCODED_LEN {
11715            panic!(
11716                "buffer is too small (need {} bytes, but got {})",
11717                Self::ENCODED_LEN,
11718                __tmp.remaining(),
11719            )
11720        }
11721        __tmp.put_u32_le(self.time_boot_ms);
11722        __tmp.put_f32_le(self.press_abs);
11723        __tmp.put_f32_le(self.press_diff);
11724        __tmp.put_i16_le(self.temperature);
11725        __tmp.put_i16_le(self.temperature_press_diff);
11726        if matches!(version, MavlinkVersion::V2) {
11727            let len = __tmp.len();
11728            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11729        } else {
11730            __tmp.len()
11731        }
11732    }
11733}
11734#[doc = "id: 267"]
11735#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
11736#[derive(Debug, Clone, PartialEq)]
11737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11739pub struct LOGGING_DATA_ACKED_DATA {
11740    #[doc = "sequence number (can wrap)"]
11741    pub sequence: u16,
11742    #[doc = "system ID of the target"]
11743    pub target_system: u8,
11744    #[doc = "component ID of the target"]
11745    pub target_component: u8,
11746    #[doc = "data length"]
11747    pub length: u8,
11748    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
11749    pub first_message_offset: u8,
11750    #[doc = "logged data"]
11751    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11752    pub data: [u8; 249],
11753}
11754impl LOGGING_DATA_ACKED_DATA {
11755    pub const ENCODED_LEN: usize = 255usize;
11756    pub const DEFAULT: Self = Self {
11757        sequence: 0_u16,
11758        target_system: 0_u8,
11759        target_component: 0_u8,
11760        length: 0_u8,
11761        first_message_offset: 0_u8,
11762        data: [0_u8; 249usize],
11763    };
11764    #[cfg(feature = "arbitrary")]
11765    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11766        use arbitrary::{Arbitrary, Unstructured};
11767        let mut buf = [0u8; 1024];
11768        rng.fill_bytes(&mut buf);
11769        let mut unstructured = Unstructured::new(&buf);
11770        Self::arbitrary(&mut unstructured).unwrap_or_default()
11771    }
11772}
11773impl Default for LOGGING_DATA_ACKED_DATA {
11774    fn default() -> Self {
11775        Self::DEFAULT.clone()
11776    }
11777}
11778impl MessageData for LOGGING_DATA_ACKED_DATA {
11779    type Message = MavMessage;
11780    const ID: u32 = 267u32;
11781    const NAME: &'static str = "LOGGING_DATA_ACKED";
11782    const EXTRA_CRC: u8 = 35u8;
11783    const ENCODED_LEN: usize = 255usize;
11784    fn deser(
11785        _version: MavlinkVersion,
11786        __input: &[u8],
11787    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11788        let avail_len = __input.len();
11789        let mut payload_buf = [0; Self::ENCODED_LEN];
11790        let mut buf = if avail_len < Self::ENCODED_LEN {
11791            payload_buf[0..avail_len].copy_from_slice(__input);
11792            Bytes::new(&payload_buf)
11793        } else {
11794            Bytes::new(__input)
11795        };
11796        let mut __struct = Self::default();
11797        __struct.sequence = buf.get_u16_le();
11798        __struct.target_system = buf.get_u8();
11799        __struct.target_component = buf.get_u8();
11800        __struct.length = buf.get_u8();
11801        __struct.first_message_offset = buf.get_u8();
11802        for v in &mut __struct.data {
11803            let val = buf.get_u8();
11804            *v = val;
11805        }
11806        Ok(__struct)
11807    }
11808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11809        let mut __tmp = BytesMut::new(bytes);
11810        #[allow(clippy::absurd_extreme_comparisons)]
11811        #[allow(unused_comparisons)]
11812        if __tmp.remaining() < Self::ENCODED_LEN {
11813            panic!(
11814                "buffer is too small (need {} bytes, but got {})",
11815                Self::ENCODED_LEN,
11816                __tmp.remaining(),
11817            )
11818        }
11819        __tmp.put_u16_le(self.sequence);
11820        __tmp.put_u8(self.target_system);
11821        __tmp.put_u8(self.target_component);
11822        __tmp.put_u8(self.length);
11823        __tmp.put_u8(self.first_message_offset);
11824        for val in &self.data {
11825            __tmp.put_u8(*val);
11826        }
11827        if matches!(version, MavlinkVersion::V2) {
11828            let len = __tmp.len();
11829            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11830        } else {
11831            __tmp.len()
11832        }
11833    }
11834}
11835#[doc = "id: 80"]
11836#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11837#[derive(Debug, Clone, PartialEq)]
11838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11840pub struct COMMAND_CANCEL_DATA {
11841    #[doc = "Command ID (of command to cancel)."]
11842    pub command: MavCmd,
11843    #[doc = "System executing long running command. Should not be broadcast (0)."]
11844    pub target_system: u8,
11845    #[doc = "Component executing long running command."]
11846    pub target_component: u8,
11847}
11848impl COMMAND_CANCEL_DATA {
11849    pub const ENCODED_LEN: usize = 4usize;
11850    pub const DEFAULT: Self = Self {
11851        command: MavCmd::DEFAULT,
11852        target_system: 0_u8,
11853        target_component: 0_u8,
11854    };
11855    #[cfg(feature = "arbitrary")]
11856    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11857        use arbitrary::{Arbitrary, Unstructured};
11858        let mut buf = [0u8; 1024];
11859        rng.fill_bytes(&mut buf);
11860        let mut unstructured = Unstructured::new(&buf);
11861        Self::arbitrary(&mut unstructured).unwrap_or_default()
11862    }
11863}
11864impl Default for COMMAND_CANCEL_DATA {
11865    fn default() -> Self {
11866        Self::DEFAULT.clone()
11867    }
11868}
11869impl MessageData for COMMAND_CANCEL_DATA {
11870    type Message = MavMessage;
11871    const ID: u32 = 80u32;
11872    const NAME: &'static str = "COMMAND_CANCEL";
11873    const EXTRA_CRC: u8 = 14u8;
11874    const ENCODED_LEN: usize = 4usize;
11875    fn deser(
11876        _version: MavlinkVersion,
11877        __input: &[u8],
11878    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11879        let avail_len = __input.len();
11880        let mut payload_buf = [0; Self::ENCODED_LEN];
11881        let mut buf = if avail_len < Self::ENCODED_LEN {
11882            payload_buf[0..avail_len].copy_from_slice(__input);
11883            Bytes::new(&payload_buf)
11884        } else {
11885            Bytes::new(__input)
11886        };
11887        let mut __struct = Self::default();
11888        let tmp = buf.get_u16_le();
11889        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11890            ::mavlink_core::error::ParserError::InvalidEnum {
11891                enum_type: "MavCmd",
11892                value: tmp as u32,
11893            },
11894        )?;
11895        __struct.target_system = buf.get_u8();
11896        __struct.target_component = buf.get_u8();
11897        Ok(__struct)
11898    }
11899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11900        let mut __tmp = BytesMut::new(bytes);
11901        #[allow(clippy::absurd_extreme_comparisons)]
11902        #[allow(unused_comparisons)]
11903        if __tmp.remaining() < Self::ENCODED_LEN {
11904            panic!(
11905                "buffer is too small (need {} bytes, but got {})",
11906                Self::ENCODED_LEN,
11907                __tmp.remaining(),
11908            )
11909        }
11910        __tmp.put_u16_le(self.command as u16);
11911        __tmp.put_u8(self.target_system);
11912        __tmp.put_u8(self.target_component);
11913        if matches!(version, MavlinkVersion::V2) {
11914            let len = __tmp.len();
11915            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11916        } else {
11917            __tmp.len()
11918        }
11919    }
11920}
11921#[doc = "id: 5"]
11922#[doc = "Request to control this MAV."]
11923#[derive(Debug, Clone, PartialEq)]
11924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11925#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11926pub struct CHANGE_OPERATOR_CONTROL_DATA {
11927    #[doc = "System the GCS requests control for"]
11928    pub target_system: u8,
11929    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
11930    pub control_request: u8,
11931    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
11932    pub version: u8,
11933    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
11934    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11935    pub passkey: [u8; 25],
11936}
11937impl CHANGE_OPERATOR_CONTROL_DATA {
11938    pub const ENCODED_LEN: usize = 28usize;
11939    pub const DEFAULT: Self = Self {
11940        target_system: 0_u8,
11941        control_request: 0_u8,
11942        version: 0_u8,
11943        passkey: [0_u8; 25usize],
11944    };
11945    #[cfg(feature = "arbitrary")]
11946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11947        use arbitrary::{Arbitrary, Unstructured};
11948        let mut buf = [0u8; 1024];
11949        rng.fill_bytes(&mut buf);
11950        let mut unstructured = Unstructured::new(&buf);
11951        Self::arbitrary(&mut unstructured).unwrap_or_default()
11952    }
11953}
11954impl Default for CHANGE_OPERATOR_CONTROL_DATA {
11955    fn default() -> Self {
11956        Self::DEFAULT.clone()
11957    }
11958}
11959impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
11960    type Message = MavMessage;
11961    const ID: u32 = 5u32;
11962    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
11963    const EXTRA_CRC: u8 = 217u8;
11964    const ENCODED_LEN: usize = 28usize;
11965    fn deser(
11966        _version: MavlinkVersion,
11967        __input: &[u8],
11968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11969        let avail_len = __input.len();
11970        let mut payload_buf = [0; Self::ENCODED_LEN];
11971        let mut buf = if avail_len < Self::ENCODED_LEN {
11972            payload_buf[0..avail_len].copy_from_slice(__input);
11973            Bytes::new(&payload_buf)
11974        } else {
11975            Bytes::new(__input)
11976        };
11977        let mut __struct = Self::default();
11978        __struct.target_system = buf.get_u8();
11979        __struct.control_request = buf.get_u8();
11980        __struct.version = buf.get_u8();
11981        for v in &mut __struct.passkey {
11982            let val = buf.get_u8();
11983            *v = val;
11984        }
11985        Ok(__struct)
11986    }
11987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11988        let mut __tmp = BytesMut::new(bytes);
11989        #[allow(clippy::absurd_extreme_comparisons)]
11990        #[allow(unused_comparisons)]
11991        if __tmp.remaining() < Self::ENCODED_LEN {
11992            panic!(
11993                "buffer is too small (need {} bytes, but got {})",
11994                Self::ENCODED_LEN,
11995                __tmp.remaining(),
11996            )
11997        }
11998        __tmp.put_u8(self.target_system);
11999        __tmp.put_u8(self.control_request);
12000        __tmp.put_u8(self.version);
12001        for val in &self.passkey {
12002            __tmp.put_u8(*val);
12003        }
12004        if matches!(version, MavlinkVersion::V2) {
12005            let len = __tmp.len();
12006            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12007        } else {
12008            __tmp.len()
12009        }
12010    }
12011}
12012#[doc = "id: 11"]
12013#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
12014#[derive(Debug, Clone, PartialEq)]
12015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12017pub struct SET_MODE_DATA {
12018    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
12019    pub custom_mode: u32,
12020    #[doc = "The system setting the mode"]
12021    pub target_system: u8,
12022    #[doc = "The new base mode."]
12023    pub base_mode: MavMode,
12024}
12025impl SET_MODE_DATA {
12026    pub const ENCODED_LEN: usize = 6usize;
12027    pub const DEFAULT: Self = Self {
12028        custom_mode: 0_u32,
12029        target_system: 0_u8,
12030        base_mode: MavMode::DEFAULT,
12031    };
12032    #[cfg(feature = "arbitrary")]
12033    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12034        use arbitrary::{Arbitrary, Unstructured};
12035        let mut buf = [0u8; 1024];
12036        rng.fill_bytes(&mut buf);
12037        let mut unstructured = Unstructured::new(&buf);
12038        Self::arbitrary(&mut unstructured).unwrap_or_default()
12039    }
12040}
12041impl Default for SET_MODE_DATA {
12042    fn default() -> Self {
12043        Self::DEFAULT.clone()
12044    }
12045}
12046impl MessageData for SET_MODE_DATA {
12047    type Message = MavMessage;
12048    const ID: u32 = 11u32;
12049    const NAME: &'static str = "SET_MODE";
12050    const EXTRA_CRC: u8 = 89u8;
12051    const ENCODED_LEN: usize = 6usize;
12052    fn deser(
12053        _version: MavlinkVersion,
12054        __input: &[u8],
12055    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12056        let avail_len = __input.len();
12057        let mut payload_buf = [0; Self::ENCODED_LEN];
12058        let mut buf = if avail_len < Self::ENCODED_LEN {
12059            payload_buf[0..avail_len].copy_from_slice(__input);
12060            Bytes::new(&payload_buf)
12061        } else {
12062            Bytes::new(__input)
12063        };
12064        let mut __struct = Self::default();
12065        __struct.custom_mode = buf.get_u32_le();
12066        __struct.target_system = buf.get_u8();
12067        let tmp = buf.get_u8();
12068        __struct.base_mode =
12069            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12070                enum_type: "MavMode",
12071                value: tmp as u32,
12072            })?;
12073        Ok(__struct)
12074    }
12075    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12076        let mut __tmp = BytesMut::new(bytes);
12077        #[allow(clippy::absurd_extreme_comparisons)]
12078        #[allow(unused_comparisons)]
12079        if __tmp.remaining() < Self::ENCODED_LEN {
12080            panic!(
12081                "buffer is too small (need {} bytes, but got {})",
12082                Self::ENCODED_LEN,
12083                __tmp.remaining(),
12084            )
12085        }
12086        __tmp.put_u32_le(self.custom_mode);
12087        __tmp.put_u8(self.target_system);
12088        __tmp.put_u8(self.base_mode as u8);
12089        if matches!(version, MavlinkVersion::V2) {
12090            let len = __tmp.len();
12091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12092        } else {
12093            __tmp.len()
12094        }
12095    }
12096}
12097#[doc = "id: 89"]
12098#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
12099#[derive(Debug, Clone, PartialEq)]
12100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12102pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
12103    #[doc = "Timestamp (time since system boot)."]
12104    pub time_boot_ms: u32,
12105    #[doc = "X Position"]
12106    pub x: f32,
12107    #[doc = "Y Position"]
12108    pub y: f32,
12109    #[doc = "Z Position"]
12110    pub z: f32,
12111    #[doc = "Roll"]
12112    pub roll: f32,
12113    #[doc = "Pitch"]
12114    pub pitch: f32,
12115    #[doc = "Yaw"]
12116    pub yaw: f32,
12117}
12118impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
12119    pub const ENCODED_LEN: usize = 28usize;
12120    pub const DEFAULT: Self = Self {
12121        time_boot_ms: 0_u32,
12122        x: 0.0_f32,
12123        y: 0.0_f32,
12124        z: 0.0_f32,
12125        roll: 0.0_f32,
12126        pitch: 0.0_f32,
12127        yaw: 0.0_f32,
12128    };
12129    #[cfg(feature = "arbitrary")]
12130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12131        use arbitrary::{Arbitrary, Unstructured};
12132        let mut buf = [0u8; 1024];
12133        rng.fill_bytes(&mut buf);
12134        let mut unstructured = Unstructured::new(&buf);
12135        Self::arbitrary(&mut unstructured).unwrap_or_default()
12136    }
12137}
12138impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
12139    fn default() -> Self {
12140        Self::DEFAULT.clone()
12141    }
12142}
12143impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
12144    type Message = MavMessage;
12145    const ID: u32 = 89u32;
12146    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
12147    const EXTRA_CRC: u8 = 231u8;
12148    const ENCODED_LEN: usize = 28usize;
12149    fn deser(
12150        _version: MavlinkVersion,
12151        __input: &[u8],
12152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12153        let avail_len = __input.len();
12154        let mut payload_buf = [0; Self::ENCODED_LEN];
12155        let mut buf = if avail_len < Self::ENCODED_LEN {
12156            payload_buf[0..avail_len].copy_from_slice(__input);
12157            Bytes::new(&payload_buf)
12158        } else {
12159            Bytes::new(__input)
12160        };
12161        let mut __struct = Self::default();
12162        __struct.time_boot_ms = buf.get_u32_le();
12163        __struct.x = buf.get_f32_le();
12164        __struct.y = buf.get_f32_le();
12165        __struct.z = buf.get_f32_le();
12166        __struct.roll = buf.get_f32_le();
12167        __struct.pitch = buf.get_f32_le();
12168        __struct.yaw = buf.get_f32_le();
12169        Ok(__struct)
12170    }
12171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12172        let mut __tmp = BytesMut::new(bytes);
12173        #[allow(clippy::absurd_extreme_comparisons)]
12174        #[allow(unused_comparisons)]
12175        if __tmp.remaining() < Self::ENCODED_LEN {
12176            panic!(
12177                "buffer is too small (need {} bytes, but got {})",
12178                Self::ENCODED_LEN,
12179                __tmp.remaining(),
12180            )
12181        }
12182        __tmp.put_u32_le(self.time_boot_ms);
12183        __tmp.put_f32_le(self.x);
12184        __tmp.put_f32_le(self.y);
12185        __tmp.put_f32_le(self.z);
12186        __tmp.put_f32_le(self.roll);
12187        __tmp.put_f32_le(self.pitch);
12188        __tmp.put_f32_le(self.yaw);
12189        if matches!(version, MavlinkVersion::V2) {
12190            let len = __tmp.len();
12191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12192        } else {
12193            __tmp.len()
12194        }
12195    }
12196}
12197#[doc = "id: 44"]
12198#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
12199#[derive(Debug, Clone, PartialEq)]
12200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12202pub struct MISSION_COUNT_DATA {
12203    #[doc = "Number of mission items in the sequence"]
12204    pub count: u16,
12205    #[doc = "System ID"]
12206    pub target_system: u8,
12207    #[doc = "Component ID"]
12208    pub target_component: u8,
12209    #[doc = "Mission type."]
12210    #[cfg_attr(feature = "serde", serde(default))]
12211    pub mission_type: MavMissionType,
12212    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
12213    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12214    pub opaque_id: u32,
12215}
12216impl MISSION_COUNT_DATA {
12217    pub const ENCODED_LEN: usize = 9usize;
12218    pub const DEFAULT: Self = Self {
12219        count: 0_u16,
12220        target_system: 0_u8,
12221        target_component: 0_u8,
12222        mission_type: MavMissionType::DEFAULT,
12223        opaque_id: 0_u32,
12224    };
12225    #[cfg(feature = "arbitrary")]
12226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12227        use arbitrary::{Arbitrary, Unstructured};
12228        let mut buf = [0u8; 1024];
12229        rng.fill_bytes(&mut buf);
12230        let mut unstructured = Unstructured::new(&buf);
12231        Self::arbitrary(&mut unstructured).unwrap_or_default()
12232    }
12233}
12234impl Default for MISSION_COUNT_DATA {
12235    fn default() -> Self {
12236        Self::DEFAULT.clone()
12237    }
12238}
12239impl MessageData for MISSION_COUNT_DATA {
12240    type Message = MavMessage;
12241    const ID: u32 = 44u32;
12242    const NAME: &'static str = "MISSION_COUNT";
12243    const EXTRA_CRC: u8 = 221u8;
12244    const ENCODED_LEN: usize = 9usize;
12245    fn deser(
12246        _version: MavlinkVersion,
12247        __input: &[u8],
12248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12249        let avail_len = __input.len();
12250        let mut payload_buf = [0; Self::ENCODED_LEN];
12251        let mut buf = if avail_len < Self::ENCODED_LEN {
12252            payload_buf[0..avail_len].copy_from_slice(__input);
12253            Bytes::new(&payload_buf)
12254        } else {
12255            Bytes::new(__input)
12256        };
12257        let mut __struct = Self::default();
12258        __struct.count = buf.get_u16_le();
12259        __struct.target_system = buf.get_u8();
12260        __struct.target_component = buf.get_u8();
12261        let tmp = buf.get_u8();
12262        __struct.mission_type =
12263            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12264                enum_type: "MavMissionType",
12265                value: tmp as u32,
12266            })?;
12267        __struct.opaque_id = buf.get_u32_le();
12268        Ok(__struct)
12269    }
12270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12271        let mut __tmp = BytesMut::new(bytes);
12272        #[allow(clippy::absurd_extreme_comparisons)]
12273        #[allow(unused_comparisons)]
12274        if __tmp.remaining() < Self::ENCODED_LEN {
12275            panic!(
12276                "buffer is too small (need {} bytes, but got {})",
12277                Self::ENCODED_LEN,
12278                __tmp.remaining(),
12279            )
12280        }
12281        __tmp.put_u16_le(self.count);
12282        __tmp.put_u8(self.target_system);
12283        __tmp.put_u8(self.target_component);
12284        __tmp.put_u8(self.mission_type as u8);
12285        __tmp.put_u32_le(self.opaque_id);
12286        if matches!(version, MavlinkVersion::V2) {
12287            let len = __tmp.len();
12288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12289        } else {
12290            __tmp.len()
12291        }
12292    }
12293}
12294#[doc = "id: 246"]
12295#[doc = "The location and information of an ADSB vehicle."]
12296#[derive(Debug, Clone, PartialEq)]
12297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12299pub struct ADSB_VEHICLE_DATA {
12300    #[doc = "ICAO address"]
12301    pub ICAO_address: u32,
12302    #[doc = "Latitude"]
12303    pub lat: i32,
12304    #[doc = "Longitude"]
12305    pub lon: i32,
12306    #[doc = "Altitude(ASL)"]
12307    pub altitude: i32,
12308    #[doc = "Course over ground"]
12309    pub heading: u16,
12310    #[doc = "The horizontal velocity"]
12311    pub hor_velocity: u16,
12312    #[doc = "The vertical velocity. Positive is up"]
12313    pub ver_velocity: i16,
12314    #[doc = "Bitmap to indicate various statuses including valid data fields"]
12315    pub flags: AdsbFlags,
12316    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
12317    pub squawk: u16,
12318    #[doc = "ADSB altitude type."]
12319    pub altitude_type: AdsbAltitudeType,
12320    #[doc = "The callsign, 8+null"]
12321    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12322    pub callsign: [u8; 9],
12323    #[doc = "ADSB emitter type."]
12324    pub emitter_type: AdsbEmitterType,
12325    #[doc = "Time since last communication in seconds"]
12326    pub tslc: u8,
12327}
12328impl ADSB_VEHICLE_DATA {
12329    pub const ENCODED_LEN: usize = 38usize;
12330    pub const DEFAULT: Self = Self {
12331        ICAO_address: 0_u32,
12332        lat: 0_i32,
12333        lon: 0_i32,
12334        altitude: 0_i32,
12335        heading: 0_u16,
12336        hor_velocity: 0_u16,
12337        ver_velocity: 0_i16,
12338        flags: AdsbFlags::DEFAULT,
12339        squawk: 0_u16,
12340        altitude_type: AdsbAltitudeType::DEFAULT,
12341        callsign: [0_u8; 9usize],
12342        emitter_type: AdsbEmitterType::DEFAULT,
12343        tslc: 0_u8,
12344    };
12345    #[cfg(feature = "arbitrary")]
12346    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12347        use arbitrary::{Arbitrary, Unstructured};
12348        let mut buf = [0u8; 1024];
12349        rng.fill_bytes(&mut buf);
12350        let mut unstructured = Unstructured::new(&buf);
12351        Self::arbitrary(&mut unstructured).unwrap_or_default()
12352    }
12353}
12354impl Default for ADSB_VEHICLE_DATA {
12355    fn default() -> Self {
12356        Self::DEFAULT.clone()
12357    }
12358}
12359impl MessageData for ADSB_VEHICLE_DATA {
12360    type Message = MavMessage;
12361    const ID: u32 = 246u32;
12362    const NAME: &'static str = "ADSB_VEHICLE";
12363    const EXTRA_CRC: u8 = 184u8;
12364    const ENCODED_LEN: usize = 38usize;
12365    fn deser(
12366        _version: MavlinkVersion,
12367        __input: &[u8],
12368    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12369        let avail_len = __input.len();
12370        let mut payload_buf = [0; Self::ENCODED_LEN];
12371        let mut buf = if avail_len < Self::ENCODED_LEN {
12372            payload_buf[0..avail_len].copy_from_slice(__input);
12373            Bytes::new(&payload_buf)
12374        } else {
12375            Bytes::new(__input)
12376        };
12377        let mut __struct = Self::default();
12378        __struct.ICAO_address = buf.get_u32_le();
12379        __struct.lat = buf.get_i32_le();
12380        __struct.lon = buf.get_i32_le();
12381        __struct.altitude = buf.get_i32_le();
12382        __struct.heading = buf.get_u16_le();
12383        __struct.hor_velocity = buf.get_u16_le();
12384        __struct.ver_velocity = buf.get_i16_le();
12385        let tmp = buf.get_u16_le();
12386        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
12387            ::mavlink_core::error::ParserError::InvalidFlag {
12388                flag_type: "AdsbFlags",
12389                value: tmp as u32,
12390            },
12391        )?;
12392        __struct.squawk = buf.get_u16_le();
12393        let tmp = buf.get_u8();
12394        __struct.altitude_type =
12395            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12396                enum_type: "AdsbAltitudeType",
12397                value: tmp as u32,
12398            })?;
12399        for v in &mut __struct.callsign {
12400            let val = buf.get_u8();
12401            *v = val;
12402        }
12403        let tmp = buf.get_u8();
12404        __struct.emitter_type =
12405            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12406                enum_type: "AdsbEmitterType",
12407                value: tmp as u32,
12408            })?;
12409        __struct.tslc = buf.get_u8();
12410        Ok(__struct)
12411    }
12412    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12413        let mut __tmp = BytesMut::new(bytes);
12414        #[allow(clippy::absurd_extreme_comparisons)]
12415        #[allow(unused_comparisons)]
12416        if __tmp.remaining() < Self::ENCODED_LEN {
12417            panic!(
12418                "buffer is too small (need {} bytes, but got {})",
12419                Self::ENCODED_LEN,
12420                __tmp.remaining(),
12421            )
12422        }
12423        __tmp.put_u32_le(self.ICAO_address);
12424        __tmp.put_i32_le(self.lat);
12425        __tmp.put_i32_le(self.lon);
12426        __tmp.put_i32_le(self.altitude);
12427        __tmp.put_u16_le(self.heading);
12428        __tmp.put_u16_le(self.hor_velocity);
12429        __tmp.put_i16_le(self.ver_velocity);
12430        __tmp.put_u16_le(self.flags.bits());
12431        __tmp.put_u16_le(self.squawk);
12432        __tmp.put_u8(self.altitude_type as u8);
12433        for val in &self.callsign {
12434            __tmp.put_u8(*val);
12435        }
12436        __tmp.put_u8(self.emitter_type as u8);
12437        __tmp.put_u8(self.tslc);
12438        if matches!(version, MavlinkVersion::V2) {
12439            let len = __tmp.len();
12440            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12441        } else {
12442            __tmp.len()
12443        }
12444    }
12445}
12446#[doc = "id: 62"]
12447#[doc = "The state of the navigation and position controller."]
12448#[derive(Debug, Clone, PartialEq)]
12449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12451pub struct NAV_CONTROLLER_OUTPUT_DATA {
12452    #[doc = "Current desired roll"]
12453    pub nav_roll: f32,
12454    #[doc = "Current desired pitch"]
12455    pub nav_pitch: f32,
12456    #[doc = "Current altitude error"]
12457    pub alt_error: f32,
12458    #[doc = "Current airspeed error"]
12459    pub aspd_error: f32,
12460    #[doc = "Current crosstrack error on x-y plane"]
12461    pub xtrack_error: f32,
12462    #[doc = "Current desired heading"]
12463    pub nav_bearing: i16,
12464    #[doc = "Bearing to current waypoint/target"]
12465    pub target_bearing: i16,
12466    #[doc = "Distance to active waypoint"]
12467    pub wp_dist: u16,
12468}
12469impl NAV_CONTROLLER_OUTPUT_DATA {
12470    pub const ENCODED_LEN: usize = 26usize;
12471    pub const DEFAULT: Self = Self {
12472        nav_roll: 0.0_f32,
12473        nav_pitch: 0.0_f32,
12474        alt_error: 0.0_f32,
12475        aspd_error: 0.0_f32,
12476        xtrack_error: 0.0_f32,
12477        nav_bearing: 0_i16,
12478        target_bearing: 0_i16,
12479        wp_dist: 0_u16,
12480    };
12481    #[cfg(feature = "arbitrary")]
12482    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12483        use arbitrary::{Arbitrary, Unstructured};
12484        let mut buf = [0u8; 1024];
12485        rng.fill_bytes(&mut buf);
12486        let mut unstructured = Unstructured::new(&buf);
12487        Self::arbitrary(&mut unstructured).unwrap_or_default()
12488    }
12489}
12490impl Default for NAV_CONTROLLER_OUTPUT_DATA {
12491    fn default() -> Self {
12492        Self::DEFAULT.clone()
12493    }
12494}
12495impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
12496    type Message = MavMessage;
12497    const ID: u32 = 62u32;
12498    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
12499    const EXTRA_CRC: u8 = 183u8;
12500    const ENCODED_LEN: usize = 26usize;
12501    fn deser(
12502        _version: MavlinkVersion,
12503        __input: &[u8],
12504    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12505        let avail_len = __input.len();
12506        let mut payload_buf = [0; Self::ENCODED_LEN];
12507        let mut buf = if avail_len < Self::ENCODED_LEN {
12508            payload_buf[0..avail_len].copy_from_slice(__input);
12509            Bytes::new(&payload_buf)
12510        } else {
12511            Bytes::new(__input)
12512        };
12513        let mut __struct = Self::default();
12514        __struct.nav_roll = buf.get_f32_le();
12515        __struct.nav_pitch = buf.get_f32_le();
12516        __struct.alt_error = buf.get_f32_le();
12517        __struct.aspd_error = buf.get_f32_le();
12518        __struct.xtrack_error = buf.get_f32_le();
12519        __struct.nav_bearing = buf.get_i16_le();
12520        __struct.target_bearing = buf.get_i16_le();
12521        __struct.wp_dist = buf.get_u16_le();
12522        Ok(__struct)
12523    }
12524    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12525        let mut __tmp = BytesMut::new(bytes);
12526        #[allow(clippy::absurd_extreme_comparisons)]
12527        #[allow(unused_comparisons)]
12528        if __tmp.remaining() < Self::ENCODED_LEN {
12529            panic!(
12530                "buffer is too small (need {} bytes, but got {})",
12531                Self::ENCODED_LEN,
12532                __tmp.remaining(),
12533            )
12534        }
12535        __tmp.put_f32_le(self.nav_roll);
12536        __tmp.put_f32_le(self.nav_pitch);
12537        __tmp.put_f32_le(self.alt_error);
12538        __tmp.put_f32_le(self.aspd_error);
12539        __tmp.put_f32_le(self.xtrack_error);
12540        __tmp.put_i16_le(self.nav_bearing);
12541        __tmp.put_i16_le(self.target_bearing);
12542        __tmp.put_u16_le(self.wp_dist);
12543        if matches!(version, MavlinkVersion::V2) {
12544            let len = __tmp.len();
12545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12546        } else {
12547            __tmp.len()
12548        }
12549    }
12550}
12551#[doc = "id: 141"]
12552#[doc = "The current system altitude."]
12553#[derive(Debug, Clone, PartialEq)]
12554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12556pub struct ALTITUDE_DATA {
12557    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12558    pub time_usec: u64,
12559    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
12560    pub altitude_monotonic: f32,
12561    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
12562    pub altitude_amsl: f32,
12563    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
12564    pub altitude_local: f32,
12565    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
12566    pub altitude_relative: f32,
12567    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
12568    pub altitude_terrain: f32,
12569    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
12570    pub bottom_clearance: f32,
12571}
12572impl ALTITUDE_DATA {
12573    pub const ENCODED_LEN: usize = 32usize;
12574    pub const DEFAULT: Self = Self {
12575        time_usec: 0_u64,
12576        altitude_monotonic: 0.0_f32,
12577        altitude_amsl: 0.0_f32,
12578        altitude_local: 0.0_f32,
12579        altitude_relative: 0.0_f32,
12580        altitude_terrain: 0.0_f32,
12581        bottom_clearance: 0.0_f32,
12582    };
12583    #[cfg(feature = "arbitrary")]
12584    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12585        use arbitrary::{Arbitrary, Unstructured};
12586        let mut buf = [0u8; 1024];
12587        rng.fill_bytes(&mut buf);
12588        let mut unstructured = Unstructured::new(&buf);
12589        Self::arbitrary(&mut unstructured).unwrap_or_default()
12590    }
12591}
12592impl Default for ALTITUDE_DATA {
12593    fn default() -> Self {
12594        Self::DEFAULT.clone()
12595    }
12596}
12597impl MessageData for ALTITUDE_DATA {
12598    type Message = MavMessage;
12599    const ID: u32 = 141u32;
12600    const NAME: &'static str = "ALTITUDE";
12601    const EXTRA_CRC: u8 = 47u8;
12602    const ENCODED_LEN: usize = 32usize;
12603    fn deser(
12604        _version: MavlinkVersion,
12605        __input: &[u8],
12606    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12607        let avail_len = __input.len();
12608        let mut payload_buf = [0; Self::ENCODED_LEN];
12609        let mut buf = if avail_len < Self::ENCODED_LEN {
12610            payload_buf[0..avail_len].copy_from_slice(__input);
12611            Bytes::new(&payload_buf)
12612        } else {
12613            Bytes::new(__input)
12614        };
12615        let mut __struct = Self::default();
12616        __struct.time_usec = buf.get_u64_le();
12617        __struct.altitude_monotonic = buf.get_f32_le();
12618        __struct.altitude_amsl = buf.get_f32_le();
12619        __struct.altitude_local = buf.get_f32_le();
12620        __struct.altitude_relative = buf.get_f32_le();
12621        __struct.altitude_terrain = buf.get_f32_le();
12622        __struct.bottom_clearance = buf.get_f32_le();
12623        Ok(__struct)
12624    }
12625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12626        let mut __tmp = BytesMut::new(bytes);
12627        #[allow(clippy::absurd_extreme_comparisons)]
12628        #[allow(unused_comparisons)]
12629        if __tmp.remaining() < Self::ENCODED_LEN {
12630            panic!(
12631                "buffer is too small (need {} bytes, but got {})",
12632                Self::ENCODED_LEN,
12633                __tmp.remaining(),
12634            )
12635        }
12636        __tmp.put_u64_le(self.time_usec);
12637        __tmp.put_f32_le(self.altitude_monotonic);
12638        __tmp.put_f32_le(self.altitude_amsl);
12639        __tmp.put_f32_le(self.altitude_local);
12640        __tmp.put_f32_le(self.altitude_relative);
12641        __tmp.put_f32_le(self.altitude_terrain);
12642        __tmp.put_f32_le(self.bottom_clearance);
12643        if matches!(version, MavlinkVersion::V2) {
12644            let len = __tmp.len();
12645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12646        } else {
12647            __tmp.len()
12648        }
12649    }
12650}
12651#[doc = "id: 410"]
12652#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
12653#[derive(Debug, Clone, PartialEq)]
12654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12656pub struct EVENT_DATA {
12657    #[doc = "Event ID (as defined in the component metadata)"]
12658    pub id: u32,
12659    #[doc = "Timestamp (time since system boot when the event happened)."]
12660    pub event_time_boot_ms: u32,
12661    #[doc = "Sequence number."]
12662    pub sequence: u16,
12663    #[doc = "Component ID"]
12664    pub destination_component: u8,
12665    #[doc = "System ID"]
12666    pub destination_system: u8,
12667    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
12668    pub log_levels: u8,
12669    #[doc = "Arguments (depend on event ID)."]
12670    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12671    pub arguments: [u8; 40],
12672}
12673impl EVENT_DATA {
12674    pub const ENCODED_LEN: usize = 53usize;
12675    pub const DEFAULT: Self = Self {
12676        id: 0_u32,
12677        event_time_boot_ms: 0_u32,
12678        sequence: 0_u16,
12679        destination_component: 0_u8,
12680        destination_system: 0_u8,
12681        log_levels: 0_u8,
12682        arguments: [0_u8; 40usize],
12683    };
12684    #[cfg(feature = "arbitrary")]
12685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12686        use arbitrary::{Arbitrary, Unstructured};
12687        let mut buf = [0u8; 1024];
12688        rng.fill_bytes(&mut buf);
12689        let mut unstructured = Unstructured::new(&buf);
12690        Self::arbitrary(&mut unstructured).unwrap_or_default()
12691    }
12692}
12693impl Default for EVENT_DATA {
12694    fn default() -> Self {
12695        Self::DEFAULT.clone()
12696    }
12697}
12698impl MessageData for EVENT_DATA {
12699    type Message = MavMessage;
12700    const ID: u32 = 410u32;
12701    const NAME: &'static str = "EVENT";
12702    const EXTRA_CRC: u8 = 160u8;
12703    const ENCODED_LEN: usize = 53usize;
12704    fn deser(
12705        _version: MavlinkVersion,
12706        __input: &[u8],
12707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12708        let avail_len = __input.len();
12709        let mut payload_buf = [0; Self::ENCODED_LEN];
12710        let mut buf = if avail_len < Self::ENCODED_LEN {
12711            payload_buf[0..avail_len].copy_from_slice(__input);
12712            Bytes::new(&payload_buf)
12713        } else {
12714            Bytes::new(__input)
12715        };
12716        let mut __struct = Self::default();
12717        __struct.id = buf.get_u32_le();
12718        __struct.event_time_boot_ms = buf.get_u32_le();
12719        __struct.sequence = buf.get_u16_le();
12720        __struct.destination_component = buf.get_u8();
12721        __struct.destination_system = buf.get_u8();
12722        __struct.log_levels = buf.get_u8();
12723        for v in &mut __struct.arguments {
12724            let val = buf.get_u8();
12725            *v = val;
12726        }
12727        Ok(__struct)
12728    }
12729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12730        let mut __tmp = BytesMut::new(bytes);
12731        #[allow(clippy::absurd_extreme_comparisons)]
12732        #[allow(unused_comparisons)]
12733        if __tmp.remaining() < Self::ENCODED_LEN {
12734            panic!(
12735                "buffer is too small (need {} bytes, but got {})",
12736                Self::ENCODED_LEN,
12737                __tmp.remaining(),
12738            )
12739        }
12740        __tmp.put_u32_le(self.id);
12741        __tmp.put_u32_le(self.event_time_boot_ms);
12742        __tmp.put_u16_le(self.sequence);
12743        __tmp.put_u8(self.destination_component);
12744        __tmp.put_u8(self.destination_system);
12745        __tmp.put_u8(self.log_levels);
12746        for val in &self.arguments {
12747            __tmp.put_u8(*val);
12748        }
12749        if matches!(version, MavlinkVersion::V2) {
12750            let len = __tmp.len();
12751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12752        } else {
12753            __tmp.len()
12754        }
12755    }
12756}
12757#[doc = "id: 67"]
12758#[doc = "Data stream status information."]
12759#[derive(Debug, Clone, PartialEq)]
12760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12762pub struct DATA_STREAM_DATA {
12763    #[doc = "The message rate"]
12764    pub message_rate: u16,
12765    #[doc = "The ID of the requested data stream"]
12766    pub stream_id: u8,
12767    #[doc = "1 stream is enabled, 0 stream is stopped."]
12768    pub on_off: u8,
12769}
12770impl DATA_STREAM_DATA {
12771    pub const ENCODED_LEN: usize = 4usize;
12772    pub const DEFAULT: Self = Self {
12773        message_rate: 0_u16,
12774        stream_id: 0_u8,
12775        on_off: 0_u8,
12776    };
12777    #[cfg(feature = "arbitrary")]
12778    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12779        use arbitrary::{Arbitrary, Unstructured};
12780        let mut buf = [0u8; 1024];
12781        rng.fill_bytes(&mut buf);
12782        let mut unstructured = Unstructured::new(&buf);
12783        Self::arbitrary(&mut unstructured).unwrap_or_default()
12784    }
12785}
12786impl Default for DATA_STREAM_DATA {
12787    fn default() -> Self {
12788        Self::DEFAULT.clone()
12789    }
12790}
12791impl MessageData for DATA_STREAM_DATA {
12792    type Message = MavMessage;
12793    const ID: u32 = 67u32;
12794    const NAME: &'static str = "DATA_STREAM";
12795    const EXTRA_CRC: u8 = 21u8;
12796    const ENCODED_LEN: usize = 4usize;
12797    fn deser(
12798        _version: MavlinkVersion,
12799        __input: &[u8],
12800    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12801        let avail_len = __input.len();
12802        let mut payload_buf = [0; Self::ENCODED_LEN];
12803        let mut buf = if avail_len < Self::ENCODED_LEN {
12804            payload_buf[0..avail_len].copy_from_slice(__input);
12805            Bytes::new(&payload_buf)
12806        } else {
12807            Bytes::new(__input)
12808        };
12809        let mut __struct = Self::default();
12810        __struct.message_rate = buf.get_u16_le();
12811        __struct.stream_id = buf.get_u8();
12812        __struct.on_off = buf.get_u8();
12813        Ok(__struct)
12814    }
12815    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12816        let mut __tmp = BytesMut::new(bytes);
12817        #[allow(clippy::absurd_extreme_comparisons)]
12818        #[allow(unused_comparisons)]
12819        if __tmp.remaining() < Self::ENCODED_LEN {
12820            panic!(
12821                "buffer is too small (need {} bytes, but got {})",
12822                Self::ENCODED_LEN,
12823                __tmp.remaining(),
12824            )
12825        }
12826        __tmp.put_u16_le(self.message_rate);
12827        __tmp.put_u8(self.stream_id);
12828        __tmp.put_u8(self.on_off);
12829        if matches!(version, MavlinkVersion::V2) {
12830            let len = __tmp.len();
12831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12832        } else {
12833            __tmp.len()
12834        }
12835    }
12836}
12837#[doc = "id: 324"]
12838#[doc = "Response from a PARAM_EXT_SET message."]
12839#[derive(Debug, Clone, PartialEq)]
12840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12842pub struct PARAM_EXT_ACK_DATA {
12843    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
12844    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12845    pub param_id: [u8; 16],
12846    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
12847    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12848    pub param_value: [u8; 128],
12849    #[doc = "Parameter type."]
12850    pub param_type: MavParamExtType,
12851    #[doc = "Result code."]
12852    pub param_result: ParamAck,
12853}
12854impl PARAM_EXT_ACK_DATA {
12855    pub const ENCODED_LEN: usize = 146usize;
12856    pub const DEFAULT: Self = Self {
12857        param_id: [0_u8; 16usize],
12858        param_value: [0_u8; 128usize],
12859        param_type: MavParamExtType::DEFAULT,
12860        param_result: ParamAck::DEFAULT,
12861    };
12862    #[cfg(feature = "arbitrary")]
12863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12864        use arbitrary::{Arbitrary, Unstructured};
12865        let mut buf = [0u8; 1024];
12866        rng.fill_bytes(&mut buf);
12867        let mut unstructured = Unstructured::new(&buf);
12868        Self::arbitrary(&mut unstructured).unwrap_or_default()
12869    }
12870}
12871impl Default for PARAM_EXT_ACK_DATA {
12872    fn default() -> Self {
12873        Self::DEFAULT.clone()
12874    }
12875}
12876impl MessageData for PARAM_EXT_ACK_DATA {
12877    type Message = MavMessage;
12878    const ID: u32 = 324u32;
12879    const NAME: &'static str = "PARAM_EXT_ACK";
12880    const EXTRA_CRC: u8 = 132u8;
12881    const ENCODED_LEN: usize = 146usize;
12882    fn deser(
12883        _version: MavlinkVersion,
12884        __input: &[u8],
12885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12886        let avail_len = __input.len();
12887        let mut payload_buf = [0; Self::ENCODED_LEN];
12888        let mut buf = if avail_len < Self::ENCODED_LEN {
12889            payload_buf[0..avail_len].copy_from_slice(__input);
12890            Bytes::new(&payload_buf)
12891        } else {
12892            Bytes::new(__input)
12893        };
12894        let mut __struct = Self::default();
12895        for v in &mut __struct.param_id {
12896            let val = buf.get_u8();
12897            *v = val;
12898        }
12899        for v in &mut __struct.param_value {
12900            let val = buf.get_u8();
12901            *v = val;
12902        }
12903        let tmp = buf.get_u8();
12904        __struct.param_type =
12905            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12906                enum_type: "MavParamExtType",
12907                value: tmp as u32,
12908            })?;
12909        let tmp = buf.get_u8();
12910        __struct.param_result =
12911            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12912                enum_type: "ParamAck",
12913                value: tmp as u32,
12914            })?;
12915        Ok(__struct)
12916    }
12917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12918        let mut __tmp = BytesMut::new(bytes);
12919        #[allow(clippy::absurd_extreme_comparisons)]
12920        #[allow(unused_comparisons)]
12921        if __tmp.remaining() < Self::ENCODED_LEN {
12922            panic!(
12923                "buffer is too small (need {} bytes, but got {})",
12924                Self::ENCODED_LEN,
12925                __tmp.remaining(),
12926            )
12927        }
12928        for val in &self.param_id {
12929            __tmp.put_u8(*val);
12930        }
12931        for val in &self.param_value {
12932            __tmp.put_u8(*val);
12933        }
12934        __tmp.put_u8(self.param_type as u8);
12935        __tmp.put_u8(self.param_result as u8);
12936        if matches!(version, MavlinkVersion::V2) {
12937            let len = __tmp.len();
12938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12939        } else {
12940            __tmp.len()
12941        }
12942    }
12943}
12944#[doc = "id: 311"]
12945#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
12946#[derive(Debug, Clone, PartialEq)]
12947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12949pub struct UAVCAN_NODE_INFO_DATA {
12950    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12951    pub time_usec: u64,
12952    #[doc = "Time since the start-up of the node."]
12953    pub uptime_sec: u32,
12954    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
12955    pub sw_vcs_commit: u32,
12956    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
12957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12958    pub name: [u8; 80],
12959    #[doc = "Hardware major version number."]
12960    pub hw_version_major: u8,
12961    #[doc = "Hardware minor version number."]
12962    pub hw_version_minor: u8,
12963    #[doc = "Hardware unique 128-bit ID."]
12964    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12965    pub hw_unique_id: [u8; 16],
12966    #[doc = "Software major version number."]
12967    pub sw_version_major: u8,
12968    #[doc = "Software minor version number."]
12969    pub sw_version_minor: u8,
12970}
12971impl UAVCAN_NODE_INFO_DATA {
12972    pub const ENCODED_LEN: usize = 116usize;
12973    pub const DEFAULT: Self = Self {
12974        time_usec: 0_u64,
12975        uptime_sec: 0_u32,
12976        sw_vcs_commit: 0_u32,
12977        name: [0_u8; 80usize],
12978        hw_version_major: 0_u8,
12979        hw_version_minor: 0_u8,
12980        hw_unique_id: [0_u8; 16usize],
12981        sw_version_major: 0_u8,
12982        sw_version_minor: 0_u8,
12983    };
12984    #[cfg(feature = "arbitrary")]
12985    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12986        use arbitrary::{Arbitrary, Unstructured};
12987        let mut buf = [0u8; 1024];
12988        rng.fill_bytes(&mut buf);
12989        let mut unstructured = Unstructured::new(&buf);
12990        Self::arbitrary(&mut unstructured).unwrap_or_default()
12991    }
12992}
12993impl Default for UAVCAN_NODE_INFO_DATA {
12994    fn default() -> Self {
12995        Self::DEFAULT.clone()
12996    }
12997}
12998impl MessageData for UAVCAN_NODE_INFO_DATA {
12999    type Message = MavMessage;
13000    const ID: u32 = 311u32;
13001    const NAME: &'static str = "UAVCAN_NODE_INFO";
13002    const EXTRA_CRC: u8 = 95u8;
13003    const ENCODED_LEN: usize = 116usize;
13004    fn deser(
13005        _version: MavlinkVersion,
13006        __input: &[u8],
13007    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13008        let avail_len = __input.len();
13009        let mut payload_buf = [0; Self::ENCODED_LEN];
13010        let mut buf = if avail_len < Self::ENCODED_LEN {
13011            payload_buf[0..avail_len].copy_from_slice(__input);
13012            Bytes::new(&payload_buf)
13013        } else {
13014            Bytes::new(__input)
13015        };
13016        let mut __struct = Self::default();
13017        __struct.time_usec = buf.get_u64_le();
13018        __struct.uptime_sec = buf.get_u32_le();
13019        __struct.sw_vcs_commit = buf.get_u32_le();
13020        for v in &mut __struct.name {
13021            let val = buf.get_u8();
13022            *v = val;
13023        }
13024        __struct.hw_version_major = buf.get_u8();
13025        __struct.hw_version_minor = buf.get_u8();
13026        for v in &mut __struct.hw_unique_id {
13027            let val = buf.get_u8();
13028            *v = val;
13029        }
13030        __struct.sw_version_major = buf.get_u8();
13031        __struct.sw_version_minor = buf.get_u8();
13032        Ok(__struct)
13033    }
13034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13035        let mut __tmp = BytesMut::new(bytes);
13036        #[allow(clippy::absurd_extreme_comparisons)]
13037        #[allow(unused_comparisons)]
13038        if __tmp.remaining() < Self::ENCODED_LEN {
13039            panic!(
13040                "buffer is too small (need {} bytes, but got {})",
13041                Self::ENCODED_LEN,
13042                __tmp.remaining(),
13043            )
13044        }
13045        __tmp.put_u64_le(self.time_usec);
13046        __tmp.put_u32_le(self.uptime_sec);
13047        __tmp.put_u32_le(self.sw_vcs_commit);
13048        for val in &self.name {
13049            __tmp.put_u8(*val);
13050        }
13051        __tmp.put_u8(self.hw_version_major);
13052        __tmp.put_u8(self.hw_version_minor);
13053        for val in &self.hw_unique_id {
13054            __tmp.put_u8(*val);
13055        }
13056        __tmp.put_u8(self.sw_version_major);
13057        __tmp.put_u8(self.sw_version_minor);
13058        if matches!(version, MavlinkVersion::V2) {
13059            let len = __tmp.len();
13060            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13061        } else {
13062            __tmp.len()
13063        }
13064    }
13065}
13066#[doc = "id: 280"]
13067#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13068#[derive(Debug, Clone, PartialEq)]
13069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13071pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13072    #[doc = "Timestamp (time since system boot)."]
13073    pub time_boot_ms: u32,
13074    #[doc = "Bitmap of gimbal capability flags."]
13075    pub cap_flags: GimbalManagerCapFlags,
13076    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13077    pub roll_min: f32,
13078    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13079    pub roll_max: f32,
13080    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13081    pub pitch_min: f32,
13082    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13083    pub pitch_max: f32,
13084    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13085    pub yaw_min: f32,
13086    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13087    pub yaw_max: f32,
13088    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13089    pub gimbal_device_id: u8,
13090}
13091impl GIMBAL_MANAGER_INFORMATION_DATA {
13092    pub const ENCODED_LEN: usize = 33usize;
13093    pub const DEFAULT: Self = Self {
13094        time_boot_ms: 0_u32,
13095        cap_flags: GimbalManagerCapFlags::DEFAULT,
13096        roll_min: 0.0_f32,
13097        roll_max: 0.0_f32,
13098        pitch_min: 0.0_f32,
13099        pitch_max: 0.0_f32,
13100        yaw_min: 0.0_f32,
13101        yaw_max: 0.0_f32,
13102        gimbal_device_id: 0_u8,
13103    };
13104    #[cfg(feature = "arbitrary")]
13105    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13106        use arbitrary::{Arbitrary, Unstructured};
13107        let mut buf = [0u8; 1024];
13108        rng.fill_bytes(&mut buf);
13109        let mut unstructured = Unstructured::new(&buf);
13110        Self::arbitrary(&mut unstructured).unwrap_or_default()
13111    }
13112}
13113impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13114    fn default() -> Self {
13115        Self::DEFAULT.clone()
13116    }
13117}
13118impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13119    type Message = MavMessage;
13120    const ID: u32 = 280u32;
13121    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13122    const EXTRA_CRC: u8 = 70u8;
13123    const ENCODED_LEN: usize = 33usize;
13124    fn deser(
13125        _version: MavlinkVersion,
13126        __input: &[u8],
13127    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13128        let avail_len = __input.len();
13129        let mut payload_buf = [0; Self::ENCODED_LEN];
13130        let mut buf = if avail_len < Self::ENCODED_LEN {
13131            payload_buf[0..avail_len].copy_from_slice(__input);
13132            Bytes::new(&payload_buf)
13133        } else {
13134            Bytes::new(__input)
13135        };
13136        let mut __struct = Self::default();
13137        __struct.time_boot_ms = buf.get_u32_le();
13138        let tmp = buf.get_u32_le();
13139        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13140            tmp & GimbalManagerCapFlags::all().bits(),
13141        )
13142        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13143            flag_type: "GimbalManagerCapFlags",
13144            value: tmp as u32,
13145        })?;
13146        __struct.roll_min = buf.get_f32_le();
13147        __struct.roll_max = buf.get_f32_le();
13148        __struct.pitch_min = buf.get_f32_le();
13149        __struct.pitch_max = buf.get_f32_le();
13150        __struct.yaw_min = buf.get_f32_le();
13151        __struct.yaw_max = buf.get_f32_le();
13152        __struct.gimbal_device_id = buf.get_u8();
13153        Ok(__struct)
13154    }
13155    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13156        let mut __tmp = BytesMut::new(bytes);
13157        #[allow(clippy::absurd_extreme_comparisons)]
13158        #[allow(unused_comparisons)]
13159        if __tmp.remaining() < Self::ENCODED_LEN {
13160            panic!(
13161                "buffer is too small (need {} bytes, but got {})",
13162                Self::ENCODED_LEN,
13163                __tmp.remaining(),
13164            )
13165        }
13166        __tmp.put_u32_le(self.time_boot_ms);
13167        __tmp.put_u32_le(self.cap_flags.bits());
13168        __tmp.put_f32_le(self.roll_min);
13169        __tmp.put_f32_le(self.roll_max);
13170        __tmp.put_f32_le(self.pitch_min);
13171        __tmp.put_f32_le(self.pitch_max);
13172        __tmp.put_f32_le(self.yaw_min);
13173        __tmp.put_f32_le(self.yaw_max);
13174        __tmp.put_u8(self.gimbal_device_id);
13175        if matches!(version, MavlinkVersion::V2) {
13176            let len = __tmp.len();
13177            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13178        } else {
13179            __tmp.len()
13180        }
13181    }
13182}
13183#[doc = "id: 245"]
13184#[doc = "Provides state for additional features."]
13185#[derive(Debug, Clone, PartialEq)]
13186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13188pub struct EXTENDED_SYS_STATE_DATA {
13189    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
13190    pub vtol_state: MavVtolState,
13191    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
13192    pub landed_state: MavLandedState,
13193}
13194impl EXTENDED_SYS_STATE_DATA {
13195    pub const ENCODED_LEN: usize = 2usize;
13196    pub const DEFAULT: Self = Self {
13197        vtol_state: MavVtolState::DEFAULT,
13198        landed_state: MavLandedState::DEFAULT,
13199    };
13200    #[cfg(feature = "arbitrary")]
13201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13202        use arbitrary::{Arbitrary, Unstructured};
13203        let mut buf = [0u8; 1024];
13204        rng.fill_bytes(&mut buf);
13205        let mut unstructured = Unstructured::new(&buf);
13206        Self::arbitrary(&mut unstructured).unwrap_or_default()
13207    }
13208}
13209impl Default for EXTENDED_SYS_STATE_DATA {
13210    fn default() -> Self {
13211        Self::DEFAULT.clone()
13212    }
13213}
13214impl MessageData for EXTENDED_SYS_STATE_DATA {
13215    type Message = MavMessage;
13216    const ID: u32 = 245u32;
13217    const NAME: &'static str = "EXTENDED_SYS_STATE";
13218    const EXTRA_CRC: u8 = 130u8;
13219    const ENCODED_LEN: usize = 2usize;
13220    fn deser(
13221        _version: MavlinkVersion,
13222        __input: &[u8],
13223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13224        let avail_len = __input.len();
13225        let mut payload_buf = [0; Self::ENCODED_LEN];
13226        let mut buf = if avail_len < Self::ENCODED_LEN {
13227            payload_buf[0..avail_len].copy_from_slice(__input);
13228            Bytes::new(&payload_buf)
13229        } else {
13230            Bytes::new(__input)
13231        };
13232        let mut __struct = Self::default();
13233        let tmp = buf.get_u8();
13234        __struct.vtol_state =
13235            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13236                enum_type: "MavVtolState",
13237                value: tmp as u32,
13238            })?;
13239        let tmp = buf.get_u8();
13240        __struct.landed_state =
13241            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13242                enum_type: "MavLandedState",
13243                value: tmp as u32,
13244            })?;
13245        Ok(__struct)
13246    }
13247    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13248        let mut __tmp = BytesMut::new(bytes);
13249        #[allow(clippy::absurd_extreme_comparisons)]
13250        #[allow(unused_comparisons)]
13251        if __tmp.remaining() < Self::ENCODED_LEN {
13252            panic!(
13253                "buffer is too small (need {} bytes, but got {})",
13254                Self::ENCODED_LEN,
13255                __tmp.remaining(),
13256            )
13257        }
13258        __tmp.put_u8(self.vtol_state as u8);
13259        __tmp.put_u8(self.landed_state as u8);
13260        if matches!(version, MavlinkVersion::V2) {
13261            let len = __tmp.len();
13262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13263        } else {
13264            __tmp.len()
13265        }
13266    }
13267}
13268#[doc = "id: 109"]
13269#[doc = "Status generated by radio and injected into MAVLink stream."]
13270#[derive(Debug, Clone, PartialEq)]
13271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13273pub struct RADIO_STATUS_DATA {
13274    #[doc = "Count of radio packet receive errors (since boot)."]
13275    pub rxerrors: u16,
13276    #[doc = "Count of error corrected radio packets (since boot)."]
13277    pub fixed: u16,
13278    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
13279    pub rssi: u8,
13280    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
13281    pub remrssi: u8,
13282    #[doc = "Remaining free transmitter buffer space."]
13283    pub txbuf: u8,
13284    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
13285    pub noise: u8,
13286    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
13287    pub remnoise: u8,
13288}
13289impl RADIO_STATUS_DATA {
13290    pub const ENCODED_LEN: usize = 9usize;
13291    pub const DEFAULT: Self = Self {
13292        rxerrors: 0_u16,
13293        fixed: 0_u16,
13294        rssi: 0_u8,
13295        remrssi: 0_u8,
13296        txbuf: 0_u8,
13297        noise: 0_u8,
13298        remnoise: 0_u8,
13299    };
13300    #[cfg(feature = "arbitrary")]
13301    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13302        use arbitrary::{Arbitrary, Unstructured};
13303        let mut buf = [0u8; 1024];
13304        rng.fill_bytes(&mut buf);
13305        let mut unstructured = Unstructured::new(&buf);
13306        Self::arbitrary(&mut unstructured).unwrap_or_default()
13307    }
13308}
13309impl Default for RADIO_STATUS_DATA {
13310    fn default() -> Self {
13311        Self::DEFAULT.clone()
13312    }
13313}
13314impl MessageData for RADIO_STATUS_DATA {
13315    type Message = MavMessage;
13316    const ID: u32 = 109u32;
13317    const NAME: &'static str = "RADIO_STATUS";
13318    const EXTRA_CRC: u8 = 185u8;
13319    const ENCODED_LEN: usize = 9usize;
13320    fn deser(
13321        _version: MavlinkVersion,
13322        __input: &[u8],
13323    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13324        let avail_len = __input.len();
13325        let mut payload_buf = [0; Self::ENCODED_LEN];
13326        let mut buf = if avail_len < Self::ENCODED_LEN {
13327            payload_buf[0..avail_len].copy_from_slice(__input);
13328            Bytes::new(&payload_buf)
13329        } else {
13330            Bytes::new(__input)
13331        };
13332        let mut __struct = Self::default();
13333        __struct.rxerrors = buf.get_u16_le();
13334        __struct.fixed = buf.get_u16_le();
13335        __struct.rssi = buf.get_u8();
13336        __struct.remrssi = buf.get_u8();
13337        __struct.txbuf = buf.get_u8();
13338        __struct.noise = buf.get_u8();
13339        __struct.remnoise = buf.get_u8();
13340        Ok(__struct)
13341    }
13342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13343        let mut __tmp = BytesMut::new(bytes);
13344        #[allow(clippy::absurd_extreme_comparisons)]
13345        #[allow(unused_comparisons)]
13346        if __tmp.remaining() < Self::ENCODED_LEN {
13347            panic!(
13348                "buffer is too small (need {} bytes, but got {})",
13349                Self::ENCODED_LEN,
13350                __tmp.remaining(),
13351            )
13352        }
13353        __tmp.put_u16_le(self.rxerrors);
13354        __tmp.put_u16_le(self.fixed);
13355        __tmp.put_u8(self.rssi);
13356        __tmp.put_u8(self.remrssi);
13357        __tmp.put_u8(self.txbuf);
13358        __tmp.put_u8(self.noise);
13359        __tmp.put_u8(self.remnoise);
13360        if matches!(version, MavlinkVersion::V2) {
13361            let len = __tmp.len();
13362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13363        } else {
13364            __tmp.len()
13365        }
13366    }
13367}
13368#[doc = "id: 116"]
13369#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
13370#[derive(Debug, Clone, PartialEq)]
13371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13373pub struct SCALED_IMU2_DATA {
13374    #[doc = "Timestamp (time since system boot)."]
13375    pub time_boot_ms: u32,
13376    #[doc = "X acceleration"]
13377    pub xacc: i16,
13378    #[doc = "Y acceleration"]
13379    pub yacc: i16,
13380    #[doc = "Z acceleration"]
13381    pub zacc: i16,
13382    #[doc = "Angular speed around X axis"]
13383    pub xgyro: i16,
13384    #[doc = "Angular speed around Y axis"]
13385    pub ygyro: i16,
13386    #[doc = "Angular speed around Z axis"]
13387    pub zgyro: i16,
13388    #[doc = "X Magnetic field"]
13389    pub xmag: i16,
13390    #[doc = "Y Magnetic field"]
13391    pub ymag: i16,
13392    #[doc = "Z Magnetic field"]
13393    pub zmag: i16,
13394    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
13395    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13396    pub temperature: i16,
13397}
13398impl SCALED_IMU2_DATA {
13399    pub const ENCODED_LEN: usize = 24usize;
13400    pub const DEFAULT: Self = Self {
13401        time_boot_ms: 0_u32,
13402        xacc: 0_i16,
13403        yacc: 0_i16,
13404        zacc: 0_i16,
13405        xgyro: 0_i16,
13406        ygyro: 0_i16,
13407        zgyro: 0_i16,
13408        xmag: 0_i16,
13409        ymag: 0_i16,
13410        zmag: 0_i16,
13411        temperature: 0_i16,
13412    };
13413    #[cfg(feature = "arbitrary")]
13414    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13415        use arbitrary::{Arbitrary, Unstructured};
13416        let mut buf = [0u8; 1024];
13417        rng.fill_bytes(&mut buf);
13418        let mut unstructured = Unstructured::new(&buf);
13419        Self::arbitrary(&mut unstructured).unwrap_or_default()
13420    }
13421}
13422impl Default for SCALED_IMU2_DATA {
13423    fn default() -> Self {
13424        Self::DEFAULT.clone()
13425    }
13426}
13427impl MessageData for SCALED_IMU2_DATA {
13428    type Message = MavMessage;
13429    const ID: u32 = 116u32;
13430    const NAME: &'static str = "SCALED_IMU2";
13431    const EXTRA_CRC: u8 = 76u8;
13432    const ENCODED_LEN: usize = 24usize;
13433    fn deser(
13434        _version: MavlinkVersion,
13435        __input: &[u8],
13436    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13437        let avail_len = __input.len();
13438        let mut payload_buf = [0; Self::ENCODED_LEN];
13439        let mut buf = if avail_len < Self::ENCODED_LEN {
13440            payload_buf[0..avail_len].copy_from_slice(__input);
13441            Bytes::new(&payload_buf)
13442        } else {
13443            Bytes::new(__input)
13444        };
13445        let mut __struct = Self::default();
13446        __struct.time_boot_ms = buf.get_u32_le();
13447        __struct.xacc = buf.get_i16_le();
13448        __struct.yacc = buf.get_i16_le();
13449        __struct.zacc = buf.get_i16_le();
13450        __struct.xgyro = buf.get_i16_le();
13451        __struct.ygyro = buf.get_i16_le();
13452        __struct.zgyro = buf.get_i16_le();
13453        __struct.xmag = buf.get_i16_le();
13454        __struct.ymag = buf.get_i16_le();
13455        __struct.zmag = buf.get_i16_le();
13456        __struct.temperature = buf.get_i16_le();
13457        Ok(__struct)
13458    }
13459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13460        let mut __tmp = BytesMut::new(bytes);
13461        #[allow(clippy::absurd_extreme_comparisons)]
13462        #[allow(unused_comparisons)]
13463        if __tmp.remaining() < Self::ENCODED_LEN {
13464            panic!(
13465                "buffer is too small (need {} bytes, but got {})",
13466                Self::ENCODED_LEN,
13467                __tmp.remaining(),
13468            )
13469        }
13470        __tmp.put_u32_le(self.time_boot_ms);
13471        __tmp.put_i16_le(self.xacc);
13472        __tmp.put_i16_le(self.yacc);
13473        __tmp.put_i16_le(self.zacc);
13474        __tmp.put_i16_le(self.xgyro);
13475        __tmp.put_i16_le(self.ygyro);
13476        __tmp.put_i16_le(self.zgyro);
13477        __tmp.put_i16_le(self.xmag);
13478        __tmp.put_i16_le(self.ymag);
13479        __tmp.put_i16_le(self.zmag);
13480        __tmp.put_i16_le(self.temperature);
13481        if matches!(version, MavlinkVersion::V2) {
13482            let len = __tmp.len();
13483            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13484        } else {
13485            __tmp.len()
13486        }
13487    }
13488}
13489#[doc = "id: 143"]
13490#[doc = "Barometer readings for 3rd barometer."]
13491#[derive(Debug, Clone, PartialEq)]
13492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13494pub struct SCALED_PRESSURE3_DATA {
13495    #[doc = "Timestamp (time since system boot)."]
13496    pub time_boot_ms: u32,
13497    #[doc = "Absolute pressure"]
13498    pub press_abs: f32,
13499    #[doc = "Differential pressure"]
13500    pub press_diff: f32,
13501    #[doc = "Absolute pressure temperature"]
13502    pub temperature: i16,
13503    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
13504    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13505    pub temperature_press_diff: i16,
13506}
13507impl SCALED_PRESSURE3_DATA {
13508    pub const ENCODED_LEN: usize = 16usize;
13509    pub const DEFAULT: Self = Self {
13510        time_boot_ms: 0_u32,
13511        press_abs: 0.0_f32,
13512        press_diff: 0.0_f32,
13513        temperature: 0_i16,
13514        temperature_press_diff: 0_i16,
13515    };
13516    #[cfg(feature = "arbitrary")]
13517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13518        use arbitrary::{Arbitrary, Unstructured};
13519        let mut buf = [0u8; 1024];
13520        rng.fill_bytes(&mut buf);
13521        let mut unstructured = Unstructured::new(&buf);
13522        Self::arbitrary(&mut unstructured).unwrap_or_default()
13523    }
13524}
13525impl Default for SCALED_PRESSURE3_DATA {
13526    fn default() -> Self {
13527        Self::DEFAULT.clone()
13528    }
13529}
13530impl MessageData for SCALED_PRESSURE3_DATA {
13531    type Message = MavMessage;
13532    const ID: u32 = 143u32;
13533    const NAME: &'static str = "SCALED_PRESSURE3";
13534    const EXTRA_CRC: u8 = 131u8;
13535    const ENCODED_LEN: usize = 16usize;
13536    fn deser(
13537        _version: MavlinkVersion,
13538        __input: &[u8],
13539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13540        let avail_len = __input.len();
13541        let mut payload_buf = [0; Self::ENCODED_LEN];
13542        let mut buf = if avail_len < Self::ENCODED_LEN {
13543            payload_buf[0..avail_len].copy_from_slice(__input);
13544            Bytes::new(&payload_buf)
13545        } else {
13546            Bytes::new(__input)
13547        };
13548        let mut __struct = Self::default();
13549        __struct.time_boot_ms = buf.get_u32_le();
13550        __struct.press_abs = buf.get_f32_le();
13551        __struct.press_diff = buf.get_f32_le();
13552        __struct.temperature = buf.get_i16_le();
13553        __struct.temperature_press_diff = buf.get_i16_le();
13554        Ok(__struct)
13555    }
13556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13557        let mut __tmp = BytesMut::new(bytes);
13558        #[allow(clippy::absurd_extreme_comparisons)]
13559        #[allow(unused_comparisons)]
13560        if __tmp.remaining() < Self::ENCODED_LEN {
13561            panic!(
13562                "buffer is too small (need {} bytes, but got {})",
13563                Self::ENCODED_LEN,
13564                __tmp.remaining(),
13565            )
13566        }
13567        __tmp.put_u32_le(self.time_boot_ms);
13568        __tmp.put_f32_le(self.press_abs);
13569        __tmp.put_f32_le(self.press_diff);
13570        __tmp.put_i16_le(self.temperature);
13571        __tmp.put_i16_le(self.temperature_press_diff);
13572        if matches!(version, MavlinkVersion::V2) {
13573            let len = __tmp.len();
13574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13575        } else {
13576            __tmp.len()
13577        }
13578    }
13579}
13580#[doc = "id: 370"]
13581#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
13582#[derive(Debug, Clone, PartialEq)]
13583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13585pub struct SMART_BATTERY_INFO_DATA {
13586    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
13587    pub capacity_full_specification: i32,
13588    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
13589    pub capacity_full: i32,
13590    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
13591    pub cycle_count: u16,
13592    #[doc = "Battery weight. 0: field not provided."]
13593    pub weight: u16,
13594    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
13595    pub discharge_minimum_voltage: u16,
13596    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
13597    pub charging_minimum_voltage: u16,
13598    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
13599    pub resting_minimum_voltage: u16,
13600    #[doc = "Battery ID"]
13601    pub id: u8,
13602    #[doc = "Function of the battery"]
13603    pub battery_function: MavBatteryFunction,
13604    #[doc = "Type (chemistry) of the battery"]
13605    pub mavtype: MavBatteryType,
13606    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
13607    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13608    pub serial_number: [u8; 16],
13609    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
13610    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13611    pub device_name: [u8; 50],
13612    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
13613    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13614    pub charging_maximum_voltage: u16,
13615    #[doc = "Number of battery cells in series. 0: field not provided."]
13616    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13617    pub cells_in_series: u8,
13618    #[doc = "Maximum pack discharge current. 0: field not provided."]
13619    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13620    pub discharge_maximum_current: u32,
13621    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
13622    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13623    pub discharge_maximum_burst_current: u32,
13624    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
13625    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13626    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13627    pub manufacture_date: [u8; 11],
13628}
13629impl SMART_BATTERY_INFO_DATA {
13630    pub const ENCODED_LEN: usize = 109usize;
13631    pub const DEFAULT: Self = Self {
13632        capacity_full_specification: 0_i32,
13633        capacity_full: 0_i32,
13634        cycle_count: 0_u16,
13635        weight: 0_u16,
13636        discharge_minimum_voltage: 0_u16,
13637        charging_minimum_voltage: 0_u16,
13638        resting_minimum_voltage: 0_u16,
13639        id: 0_u8,
13640        battery_function: MavBatteryFunction::DEFAULT,
13641        mavtype: MavBatteryType::DEFAULT,
13642        serial_number: [0_u8; 16usize],
13643        device_name: [0_u8; 50usize],
13644        charging_maximum_voltage: 0_u16,
13645        cells_in_series: 0_u8,
13646        discharge_maximum_current: 0_u32,
13647        discharge_maximum_burst_current: 0_u32,
13648        manufacture_date: [0_u8; 11usize],
13649    };
13650    #[cfg(feature = "arbitrary")]
13651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13652        use arbitrary::{Arbitrary, Unstructured};
13653        let mut buf = [0u8; 1024];
13654        rng.fill_bytes(&mut buf);
13655        let mut unstructured = Unstructured::new(&buf);
13656        Self::arbitrary(&mut unstructured).unwrap_or_default()
13657    }
13658}
13659impl Default for SMART_BATTERY_INFO_DATA {
13660    fn default() -> Self {
13661        Self::DEFAULT.clone()
13662    }
13663}
13664impl MessageData for SMART_BATTERY_INFO_DATA {
13665    type Message = MavMessage;
13666    const ID: u32 = 370u32;
13667    const NAME: &'static str = "SMART_BATTERY_INFO";
13668    const EXTRA_CRC: u8 = 75u8;
13669    const ENCODED_LEN: usize = 109usize;
13670    fn deser(
13671        _version: MavlinkVersion,
13672        __input: &[u8],
13673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13674        let avail_len = __input.len();
13675        let mut payload_buf = [0; Self::ENCODED_LEN];
13676        let mut buf = if avail_len < Self::ENCODED_LEN {
13677            payload_buf[0..avail_len].copy_from_slice(__input);
13678            Bytes::new(&payload_buf)
13679        } else {
13680            Bytes::new(__input)
13681        };
13682        let mut __struct = Self::default();
13683        __struct.capacity_full_specification = buf.get_i32_le();
13684        __struct.capacity_full = buf.get_i32_le();
13685        __struct.cycle_count = buf.get_u16_le();
13686        __struct.weight = buf.get_u16_le();
13687        __struct.discharge_minimum_voltage = buf.get_u16_le();
13688        __struct.charging_minimum_voltage = buf.get_u16_le();
13689        __struct.resting_minimum_voltage = buf.get_u16_le();
13690        __struct.id = buf.get_u8();
13691        let tmp = buf.get_u8();
13692        __struct.battery_function =
13693            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13694                enum_type: "MavBatteryFunction",
13695                value: tmp as u32,
13696            })?;
13697        let tmp = buf.get_u8();
13698        __struct.mavtype =
13699            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13700                enum_type: "MavBatteryType",
13701                value: tmp as u32,
13702            })?;
13703        for v in &mut __struct.serial_number {
13704            let val = buf.get_u8();
13705            *v = val;
13706        }
13707        for v in &mut __struct.device_name {
13708            let val = buf.get_u8();
13709            *v = val;
13710        }
13711        __struct.charging_maximum_voltage = buf.get_u16_le();
13712        __struct.cells_in_series = buf.get_u8();
13713        __struct.discharge_maximum_current = buf.get_u32_le();
13714        __struct.discharge_maximum_burst_current = buf.get_u32_le();
13715        for v in &mut __struct.manufacture_date {
13716            let val = buf.get_u8();
13717            *v = val;
13718        }
13719        Ok(__struct)
13720    }
13721    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13722        let mut __tmp = BytesMut::new(bytes);
13723        #[allow(clippy::absurd_extreme_comparisons)]
13724        #[allow(unused_comparisons)]
13725        if __tmp.remaining() < Self::ENCODED_LEN {
13726            panic!(
13727                "buffer is too small (need {} bytes, but got {})",
13728                Self::ENCODED_LEN,
13729                __tmp.remaining(),
13730            )
13731        }
13732        __tmp.put_i32_le(self.capacity_full_specification);
13733        __tmp.put_i32_le(self.capacity_full);
13734        __tmp.put_u16_le(self.cycle_count);
13735        __tmp.put_u16_le(self.weight);
13736        __tmp.put_u16_le(self.discharge_minimum_voltage);
13737        __tmp.put_u16_le(self.charging_minimum_voltage);
13738        __tmp.put_u16_le(self.resting_minimum_voltage);
13739        __tmp.put_u8(self.id);
13740        __tmp.put_u8(self.battery_function as u8);
13741        __tmp.put_u8(self.mavtype as u8);
13742        for val in &self.serial_number {
13743            __tmp.put_u8(*val);
13744        }
13745        for val in &self.device_name {
13746            __tmp.put_u8(*val);
13747        }
13748        __tmp.put_u16_le(self.charging_maximum_voltage);
13749        __tmp.put_u8(self.cells_in_series);
13750        __tmp.put_u32_le(self.discharge_maximum_current);
13751        __tmp.put_u32_le(self.discharge_maximum_burst_current);
13752        for val in &self.manufacture_date {
13753            __tmp.put_u8(*val);
13754        }
13755        if matches!(version, MavlinkVersion::V2) {
13756            let len = __tmp.len();
13757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13758        } else {
13759            __tmp.len()
13760        }
13761    }
13762}
13763#[doc = "id: 12915"]
13764#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
13765#[derive(Debug, Clone, PartialEq)]
13766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13768pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
13769    #[doc = "System ID (0 for broadcast)."]
13770    pub target_system: u8,
13771    #[doc = "Component ID (0 for broadcast)."]
13772    pub target_component: u8,
13773    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
13774    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13775    pub id_or_mac: [u8; 20],
13776    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
13777    pub single_message_size: u8,
13778    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
13779    pub msg_pack_size: u8,
13780    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
13781    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13782    pub messages: [u8; 225],
13783}
13784impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
13785    pub const ENCODED_LEN: usize = 249usize;
13786    pub const DEFAULT: Self = Self {
13787        target_system: 0_u8,
13788        target_component: 0_u8,
13789        id_or_mac: [0_u8; 20usize],
13790        single_message_size: 0_u8,
13791        msg_pack_size: 0_u8,
13792        messages: [0_u8; 225usize],
13793    };
13794    #[cfg(feature = "arbitrary")]
13795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13796        use arbitrary::{Arbitrary, Unstructured};
13797        let mut buf = [0u8; 1024];
13798        rng.fill_bytes(&mut buf);
13799        let mut unstructured = Unstructured::new(&buf);
13800        Self::arbitrary(&mut unstructured).unwrap_or_default()
13801    }
13802}
13803impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
13804    fn default() -> Self {
13805        Self::DEFAULT.clone()
13806    }
13807}
13808impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
13809    type Message = MavMessage;
13810    const ID: u32 = 12915u32;
13811    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
13812    const EXTRA_CRC: u8 = 94u8;
13813    const ENCODED_LEN: usize = 249usize;
13814    fn deser(
13815        _version: MavlinkVersion,
13816        __input: &[u8],
13817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13818        let avail_len = __input.len();
13819        let mut payload_buf = [0; Self::ENCODED_LEN];
13820        let mut buf = if avail_len < Self::ENCODED_LEN {
13821            payload_buf[0..avail_len].copy_from_slice(__input);
13822            Bytes::new(&payload_buf)
13823        } else {
13824            Bytes::new(__input)
13825        };
13826        let mut __struct = Self::default();
13827        __struct.target_system = buf.get_u8();
13828        __struct.target_component = buf.get_u8();
13829        for v in &mut __struct.id_or_mac {
13830            let val = buf.get_u8();
13831            *v = val;
13832        }
13833        __struct.single_message_size = buf.get_u8();
13834        __struct.msg_pack_size = buf.get_u8();
13835        for v in &mut __struct.messages {
13836            let val = buf.get_u8();
13837            *v = val;
13838        }
13839        Ok(__struct)
13840    }
13841    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13842        let mut __tmp = BytesMut::new(bytes);
13843        #[allow(clippy::absurd_extreme_comparisons)]
13844        #[allow(unused_comparisons)]
13845        if __tmp.remaining() < Self::ENCODED_LEN {
13846            panic!(
13847                "buffer is too small (need {} bytes, but got {})",
13848                Self::ENCODED_LEN,
13849                __tmp.remaining(),
13850            )
13851        }
13852        __tmp.put_u8(self.target_system);
13853        __tmp.put_u8(self.target_component);
13854        for val in &self.id_or_mac {
13855            __tmp.put_u8(*val);
13856        }
13857        __tmp.put_u8(self.single_message_size);
13858        __tmp.put_u8(self.msg_pack_size);
13859        for val in &self.messages {
13860            __tmp.put_u8(*val);
13861        }
13862        if matches!(version, MavlinkVersion::V2) {
13863            let len = __tmp.len();
13864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13865        } else {
13866            __tmp.len()
13867        }
13868    }
13869}
13870#[doc = "id: 125"]
13871#[doc = "Power supply status."]
13872#[derive(Debug, Clone, PartialEq)]
13873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13875pub struct POWER_STATUS_DATA {
13876    #[doc = "5V rail voltage."]
13877    pub Vcc: u16,
13878    #[doc = "Servo rail voltage."]
13879    pub Vservo: u16,
13880    #[doc = "Bitmap of power supply status flags."]
13881    pub flags: MavPowerStatus,
13882}
13883impl POWER_STATUS_DATA {
13884    pub const ENCODED_LEN: usize = 6usize;
13885    pub const DEFAULT: Self = Self {
13886        Vcc: 0_u16,
13887        Vservo: 0_u16,
13888        flags: MavPowerStatus::DEFAULT,
13889    };
13890    #[cfg(feature = "arbitrary")]
13891    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13892        use arbitrary::{Arbitrary, Unstructured};
13893        let mut buf = [0u8; 1024];
13894        rng.fill_bytes(&mut buf);
13895        let mut unstructured = Unstructured::new(&buf);
13896        Self::arbitrary(&mut unstructured).unwrap_or_default()
13897    }
13898}
13899impl Default for POWER_STATUS_DATA {
13900    fn default() -> Self {
13901        Self::DEFAULT.clone()
13902    }
13903}
13904impl MessageData for POWER_STATUS_DATA {
13905    type Message = MavMessage;
13906    const ID: u32 = 125u32;
13907    const NAME: &'static str = "POWER_STATUS";
13908    const EXTRA_CRC: u8 = 203u8;
13909    const ENCODED_LEN: usize = 6usize;
13910    fn deser(
13911        _version: MavlinkVersion,
13912        __input: &[u8],
13913    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13914        let avail_len = __input.len();
13915        let mut payload_buf = [0; Self::ENCODED_LEN];
13916        let mut buf = if avail_len < Self::ENCODED_LEN {
13917            payload_buf[0..avail_len].copy_from_slice(__input);
13918            Bytes::new(&payload_buf)
13919        } else {
13920            Bytes::new(__input)
13921        };
13922        let mut __struct = Self::default();
13923        __struct.Vcc = buf.get_u16_le();
13924        __struct.Vservo = buf.get_u16_le();
13925        let tmp = buf.get_u16_le();
13926        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
13927            ::mavlink_core::error::ParserError::InvalidFlag {
13928                flag_type: "MavPowerStatus",
13929                value: tmp as u32,
13930            },
13931        )?;
13932        Ok(__struct)
13933    }
13934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13935        let mut __tmp = BytesMut::new(bytes);
13936        #[allow(clippy::absurd_extreme_comparisons)]
13937        #[allow(unused_comparisons)]
13938        if __tmp.remaining() < Self::ENCODED_LEN {
13939            panic!(
13940                "buffer is too small (need {} bytes, but got {})",
13941                Self::ENCODED_LEN,
13942                __tmp.remaining(),
13943            )
13944        }
13945        __tmp.put_u16_le(self.Vcc);
13946        __tmp.put_u16_le(self.Vservo);
13947        __tmp.put_u16_le(self.flags.bits());
13948        if matches!(version, MavlinkVersion::V2) {
13949            let len = __tmp.len();
13950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13951        } else {
13952            __tmp.len()
13953        }
13954    }
13955}
13956#[doc = "id: 34"]
13957#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
13958#[derive(Debug, Clone, PartialEq)]
13959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13961pub struct RC_CHANNELS_SCALED_DATA {
13962    #[doc = "Timestamp (time since system boot)."]
13963    pub time_boot_ms: u32,
13964    #[doc = "RC channel 1 value scaled."]
13965    pub chan1_scaled: i16,
13966    #[doc = "RC channel 2 value scaled."]
13967    pub chan2_scaled: i16,
13968    #[doc = "RC channel 3 value scaled."]
13969    pub chan3_scaled: i16,
13970    #[doc = "RC channel 4 value scaled."]
13971    pub chan4_scaled: i16,
13972    #[doc = "RC channel 5 value scaled."]
13973    pub chan5_scaled: i16,
13974    #[doc = "RC channel 6 value scaled."]
13975    pub chan6_scaled: i16,
13976    #[doc = "RC channel 7 value scaled."]
13977    pub chan7_scaled: i16,
13978    #[doc = "RC channel 8 value scaled."]
13979    pub chan8_scaled: i16,
13980    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
13981    pub port: u8,
13982    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
13983    pub rssi: u8,
13984}
13985impl RC_CHANNELS_SCALED_DATA {
13986    pub const ENCODED_LEN: usize = 22usize;
13987    pub const DEFAULT: Self = Self {
13988        time_boot_ms: 0_u32,
13989        chan1_scaled: 0_i16,
13990        chan2_scaled: 0_i16,
13991        chan3_scaled: 0_i16,
13992        chan4_scaled: 0_i16,
13993        chan5_scaled: 0_i16,
13994        chan6_scaled: 0_i16,
13995        chan7_scaled: 0_i16,
13996        chan8_scaled: 0_i16,
13997        port: 0_u8,
13998        rssi: 0_u8,
13999    };
14000    #[cfg(feature = "arbitrary")]
14001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14002        use arbitrary::{Arbitrary, Unstructured};
14003        let mut buf = [0u8; 1024];
14004        rng.fill_bytes(&mut buf);
14005        let mut unstructured = Unstructured::new(&buf);
14006        Self::arbitrary(&mut unstructured).unwrap_or_default()
14007    }
14008}
14009impl Default for RC_CHANNELS_SCALED_DATA {
14010    fn default() -> Self {
14011        Self::DEFAULT.clone()
14012    }
14013}
14014impl MessageData for RC_CHANNELS_SCALED_DATA {
14015    type Message = MavMessage;
14016    const ID: u32 = 34u32;
14017    const NAME: &'static str = "RC_CHANNELS_SCALED";
14018    const EXTRA_CRC: u8 = 237u8;
14019    const ENCODED_LEN: usize = 22usize;
14020    fn deser(
14021        _version: MavlinkVersion,
14022        __input: &[u8],
14023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14024        let avail_len = __input.len();
14025        let mut payload_buf = [0; Self::ENCODED_LEN];
14026        let mut buf = if avail_len < Self::ENCODED_LEN {
14027            payload_buf[0..avail_len].copy_from_slice(__input);
14028            Bytes::new(&payload_buf)
14029        } else {
14030            Bytes::new(__input)
14031        };
14032        let mut __struct = Self::default();
14033        __struct.time_boot_ms = buf.get_u32_le();
14034        __struct.chan1_scaled = buf.get_i16_le();
14035        __struct.chan2_scaled = buf.get_i16_le();
14036        __struct.chan3_scaled = buf.get_i16_le();
14037        __struct.chan4_scaled = buf.get_i16_le();
14038        __struct.chan5_scaled = buf.get_i16_le();
14039        __struct.chan6_scaled = buf.get_i16_le();
14040        __struct.chan7_scaled = buf.get_i16_le();
14041        __struct.chan8_scaled = buf.get_i16_le();
14042        __struct.port = buf.get_u8();
14043        __struct.rssi = buf.get_u8();
14044        Ok(__struct)
14045    }
14046    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14047        let mut __tmp = BytesMut::new(bytes);
14048        #[allow(clippy::absurd_extreme_comparisons)]
14049        #[allow(unused_comparisons)]
14050        if __tmp.remaining() < Self::ENCODED_LEN {
14051            panic!(
14052                "buffer is too small (need {} bytes, but got {})",
14053                Self::ENCODED_LEN,
14054                __tmp.remaining(),
14055            )
14056        }
14057        __tmp.put_u32_le(self.time_boot_ms);
14058        __tmp.put_i16_le(self.chan1_scaled);
14059        __tmp.put_i16_le(self.chan2_scaled);
14060        __tmp.put_i16_le(self.chan3_scaled);
14061        __tmp.put_i16_le(self.chan4_scaled);
14062        __tmp.put_i16_le(self.chan5_scaled);
14063        __tmp.put_i16_le(self.chan6_scaled);
14064        __tmp.put_i16_le(self.chan7_scaled);
14065        __tmp.put_i16_le(self.chan8_scaled);
14066        __tmp.put_u8(self.port);
14067        __tmp.put_u8(self.rssi);
14068        if matches!(version, MavlinkVersion::V2) {
14069            let len = __tmp.len();
14070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14071        } else {
14072            __tmp.len()
14073        }
14074    }
14075}
14076#[doc = "id: 259"]
14077#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
14078#[derive(Debug, Clone, PartialEq)]
14079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14081pub struct CAMERA_INFORMATION_DATA {
14082    #[doc = "Timestamp (time since system boot)."]
14083    pub time_boot_ms: u32,
14084    #[doc = "0xff). Use 0 if not known."]
14085    pub firmware_version: u32,
14086    #[doc = "Focal length. Use NaN if not known."]
14087    pub focal_length: f32,
14088    #[doc = "Image sensor size horizontal. Use NaN if not known."]
14089    pub sensor_size_h: f32,
14090    #[doc = "Image sensor size vertical. Use NaN if not known."]
14091    pub sensor_size_v: f32,
14092    #[doc = "Bitmap of camera capability flags."]
14093    pub flags: CameraCapFlags,
14094    #[doc = "Horizontal image resolution. Use 0 if not known."]
14095    pub resolution_h: u16,
14096    #[doc = "Vertical image resolution. Use 0 if not known."]
14097    pub resolution_v: u16,
14098    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
14099    pub cam_definition_version: u16,
14100    #[doc = "Name of the camera vendor"]
14101    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14102    pub vendor_name: [u8; 32],
14103    #[doc = "Name of the camera model"]
14104    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14105    pub model_name: [u8; 32],
14106    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
14107    pub lens_id: u8,
14108    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
14109    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14110    pub cam_definition_uri: [u8; 140],
14111    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
14112    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14113    pub gimbal_device_id: u8,
14114    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
14115    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14116    pub camera_device_id: u8,
14117}
14118impl CAMERA_INFORMATION_DATA {
14119    pub const ENCODED_LEN: usize = 237usize;
14120    pub const DEFAULT: Self = Self {
14121        time_boot_ms: 0_u32,
14122        firmware_version: 0_u32,
14123        focal_length: 0.0_f32,
14124        sensor_size_h: 0.0_f32,
14125        sensor_size_v: 0.0_f32,
14126        flags: CameraCapFlags::DEFAULT,
14127        resolution_h: 0_u16,
14128        resolution_v: 0_u16,
14129        cam_definition_version: 0_u16,
14130        vendor_name: [0_u8; 32usize],
14131        model_name: [0_u8; 32usize],
14132        lens_id: 0_u8,
14133        cam_definition_uri: [0_u8; 140usize],
14134        gimbal_device_id: 0_u8,
14135        camera_device_id: 0_u8,
14136    };
14137    #[cfg(feature = "arbitrary")]
14138    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14139        use arbitrary::{Arbitrary, Unstructured};
14140        let mut buf = [0u8; 1024];
14141        rng.fill_bytes(&mut buf);
14142        let mut unstructured = Unstructured::new(&buf);
14143        Self::arbitrary(&mut unstructured).unwrap_or_default()
14144    }
14145}
14146impl Default for CAMERA_INFORMATION_DATA {
14147    fn default() -> Self {
14148        Self::DEFAULT.clone()
14149    }
14150}
14151impl MessageData for CAMERA_INFORMATION_DATA {
14152    type Message = MavMessage;
14153    const ID: u32 = 259u32;
14154    const NAME: &'static str = "CAMERA_INFORMATION";
14155    const EXTRA_CRC: u8 = 92u8;
14156    const ENCODED_LEN: usize = 237usize;
14157    fn deser(
14158        _version: MavlinkVersion,
14159        __input: &[u8],
14160    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14161        let avail_len = __input.len();
14162        let mut payload_buf = [0; Self::ENCODED_LEN];
14163        let mut buf = if avail_len < Self::ENCODED_LEN {
14164            payload_buf[0..avail_len].copy_from_slice(__input);
14165            Bytes::new(&payload_buf)
14166        } else {
14167            Bytes::new(__input)
14168        };
14169        let mut __struct = Self::default();
14170        __struct.time_boot_ms = buf.get_u32_le();
14171        __struct.firmware_version = buf.get_u32_le();
14172        __struct.focal_length = buf.get_f32_le();
14173        __struct.sensor_size_h = buf.get_f32_le();
14174        __struct.sensor_size_v = buf.get_f32_le();
14175        let tmp = buf.get_u32_le();
14176        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
14177            ::mavlink_core::error::ParserError::InvalidFlag {
14178                flag_type: "CameraCapFlags",
14179                value: tmp as u32,
14180            },
14181        )?;
14182        __struct.resolution_h = buf.get_u16_le();
14183        __struct.resolution_v = buf.get_u16_le();
14184        __struct.cam_definition_version = buf.get_u16_le();
14185        for v in &mut __struct.vendor_name {
14186            let val = buf.get_u8();
14187            *v = val;
14188        }
14189        for v in &mut __struct.model_name {
14190            let val = buf.get_u8();
14191            *v = val;
14192        }
14193        __struct.lens_id = buf.get_u8();
14194        for v in &mut __struct.cam_definition_uri {
14195            let val = buf.get_u8();
14196            *v = val;
14197        }
14198        __struct.gimbal_device_id = buf.get_u8();
14199        __struct.camera_device_id = buf.get_u8();
14200        Ok(__struct)
14201    }
14202    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14203        let mut __tmp = BytesMut::new(bytes);
14204        #[allow(clippy::absurd_extreme_comparisons)]
14205        #[allow(unused_comparisons)]
14206        if __tmp.remaining() < Self::ENCODED_LEN {
14207            panic!(
14208                "buffer is too small (need {} bytes, but got {})",
14209                Self::ENCODED_LEN,
14210                __tmp.remaining(),
14211            )
14212        }
14213        __tmp.put_u32_le(self.time_boot_ms);
14214        __tmp.put_u32_le(self.firmware_version);
14215        __tmp.put_f32_le(self.focal_length);
14216        __tmp.put_f32_le(self.sensor_size_h);
14217        __tmp.put_f32_le(self.sensor_size_v);
14218        __tmp.put_u32_le(self.flags.bits());
14219        __tmp.put_u16_le(self.resolution_h);
14220        __tmp.put_u16_le(self.resolution_v);
14221        __tmp.put_u16_le(self.cam_definition_version);
14222        for val in &self.vendor_name {
14223            __tmp.put_u8(*val);
14224        }
14225        for val in &self.model_name {
14226            __tmp.put_u8(*val);
14227        }
14228        __tmp.put_u8(self.lens_id);
14229        for val in &self.cam_definition_uri {
14230            __tmp.put_u8(*val);
14231        }
14232        __tmp.put_u8(self.gimbal_device_id);
14233        __tmp.put_u8(self.camera_device_id);
14234        if matches!(version, MavlinkVersion::V2) {
14235            let len = __tmp.len();
14236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14237        } else {
14238            __tmp.len()
14239        }
14240    }
14241}
14242#[doc = "id: 340"]
14243#[doc = "The global position resulting from GPS and sensor fusion."]
14244#[derive(Debug, Clone, PartialEq)]
14245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14247pub struct UTM_GLOBAL_POSITION_DATA {
14248    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
14249    pub time: u64,
14250    #[doc = "Latitude (WGS84)"]
14251    pub lat: i32,
14252    #[doc = "Longitude (WGS84)"]
14253    pub lon: i32,
14254    #[doc = "Altitude (WGS84)"]
14255    pub alt: i32,
14256    #[doc = "Altitude above ground"]
14257    pub relative_alt: i32,
14258    #[doc = "Next waypoint, latitude (WGS84)"]
14259    pub next_lat: i32,
14260    #[doc = "Next waypoint, longitude (WGS84)"]
14261    pub next_lon: i32,
14262    #[doc = "Next waypoint, altitude (WGS84)"]
14263    pub next_alt: i32,
14264    #[doc = "Ground X speed (latitude, positive north)"]
14265    pub vx: i16,
14266    #[doc = "Ground Y speed (longitude, positive east)"]
14267    pub vy: i16,
14268    #[doc = "Ground Z speed (altitude, positive down)"]
14269    pub vz: i16,
14270    #[doc = "Horizontal position uncertainty (standard deviation)"]
14271    pub h_acc: u16,
14272    #[doc = "Altitude uncertainty (standard deviation)"]
14273    pub v_acc: u16,
14274    #[doc = "Speed uncertainty (standard deviation)"]
14275    pub vel_acc: u16,
14276    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
14277    pub update_rate: u16,
14278    #[doc = "Unique UAS ID."]
14279    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14280    pub uas_id: [u8; 18],
14281    #[doc = "Flight state"]
14282    pub flight_state: UtmFlightState,
14283    #[doc = "Bitwise OR combination of the data available flags."]
14284    pub flags: UtmDataAvailFlags,
14285}
14286impl UTM_GLOBAL_POSITION_DATA {
14287    pub const ENCODED_LEN: usize = 70usize;
14288    pub const DEFAULT: Self = Self {
14289        time: 0_u64,
14290        lat: 0_i32,
14291        lon: 0_i32,
14292        alt: 0_i32,
14293        relative_alt: 0_i32,
14294        next_lat: 0_i32,
14295        next_lon: 0_i32,
14296        next_alt: 0_i32,
14297        vx: 0_i16,
14298        vy: 0_i16,
14299        vz: 0_i16,
14300        h_acc: 0_u16,
14301        v_acc: 0_u16,
14302        vel_acc: 0_u16,
14303        update_rate: 0_u16,
14304        uas_id: [0_u8; 18usize],
14305        flight_state: UtmFlightState::DEFAULT,
14306        flags: UtmDataAvailFlags::DEFAULT,
14307    };
14308    #[cfg(feature = "arbitrary")]
14309    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14310        use arbitrary::{Arbitrary, Unstructured};
14311        let mut buf = [0u8; 1024];
14312        rng.fill_bytes(&mut buf);
14313        let mut unstructured = Unstructured::new(&buf);
14314        Self::arbitrary(&mut unstructured).unwrap_or_default()
14315    }
14316}
14317impl Default for UTM_GLOBAL_POSITION_DATA {
14318    fn default() -> Self {
14319        Self::DEFAULT.clone()
14320    }
14321}
14322impl MessageData for UTM_GLOBAL_POSITION_DATA {
14323    type Message = MavMessage;
14324    const ID: u32 = 340u32;
14325    const NAME: &'static str = "UTM_GLOBAL_POSITION";
14326    const EXTRA_CRC: u8 = 99u8;
14327    const ENCODED_LEN: usize = 70usize;
14328    fn deser(
14329        _version: MavlinkVersion,
14330        __input: &[u8],
14331    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14332        let avail_len = __input.len();
14333        let mut payload_buf = [0; Self::ENCODED_LEN];
14334        let mut buf = if avail_len < Self::ENCODED_LEN {
14335            payload_buf[0..avail_len].copy_from_slice(__input);
14336            Bytes::new(&payload_buf)
14337        } else {
14338            Bytes::new(__input)
14339        };
14340        let mut __struct = Self::default();
14341        __struct.time = buf.get_u64_le();
14342        __struct.lat = buf.get_i32_le();
14343        __struct.lon = buf.get_i32_le();
14344        __struct.alt = buf.get_i32_le();
14345        __struct.relative_alt = buf.get_i32_le();
14346        __struct.next_lat = buf.get_i32_le();
14347        __struct.next_lon = buf.get_i32_le();
14348        __struct.next_alt = buf.get_i32_le();
14349        __struct.vx = buf.get_i16_le();
14350        __struct.vy = buf.get_i16_le();
14351        __struct.vz = buf.get_i16_le();
14352        __struct.h_acc = buf.get_u16_le();
14353        __struct.v_acc = buf.get_u16_le();
14354        __struct.vel_acc = buf.get_u16_le();
14355        __struct.update_rate = buf.get_u16_le();
14356        for v in &mut __struct.uas_id {
14357            let val = buf.get_u8();
14358            *v = val;
14359        }
14360        let tmp = buf.get_u8();
14361        __struct.flight_state =
14362            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14363                enum_type: "UtmFlightState",
14364                value: tmp as u32,
14365            })?;
14366        let tmp = buf.get_u8();
14367        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
14368            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14369                flag_type: "UtmDataAvailFlags",
14370                value: tmp as u32,
14371            })?;
14372        Ok(__struct)
14373    }
14374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14375        let mut __tmp = BytesMut::new(bytes);
14376        #[allow(clippy::absurd_extreme_comparisons)]
14377        #[allow(unused_comparisons)]
14378        if __tmp.remaining() < Self::ENCODED_LEN {
14379            panic!(
14380                "buffer is too small (need {} bytes, but got {})",
14381                Self::ENCODED_LEN,
14382                __tmp.remaining(),
14383            )
14384        }
14385        __tmp.put_u64_le(self.time);
14386        __tmp.put_i32_le(self.lat);
14387        __tmp.put_i32_le(self.lon);
14388        __tmp.put_i32_le(self.alt);
14389        __tmp.put_i32_le(self.relative_alt);
14390        __tmp.put_i32_le(self.next_lat);
14391        __tmp.put_i32_le(self.next_lon);
14392        __tmp.put_i32_le(self.next_alt);
14393        __tmp.put_i16_le(self.vx);
14394        __tmp.put_i16_le(self.vy);
14395        __tmp.put_i16_le(self.vz);
14396        __tmp.put_u16_le(self.h_acc);
14397        __tmp.put_u16_le(self.v_acc);
14398        __tmp.put_u16_le(self.vel_acc);
14399        __tmp.put_u16_le(self.update_rate);
14400        for val in &self.uas_id {
14401            __tmp.put_u8(*val);
14402        }
14403        __tmp.put_u8(self.flight_state as u8);
14404        __tmp.put_u8(self.flags.bits());
14405        if matches!(version, MavlinkVersion::V2) {
14406            let len = __tmp.len();
14407            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14408        } else {
14409            __tmp.len()
14410        }
14411    }
14412}
14413#[doc = "id: 288"]
14414#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
14415#[derive(Debug, Clone, PartialEq)]
14416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14418pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14419    #[doc = "High level gimbal manager flags."]
14420    pub flags: GimbalManagerFlags,
14421    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14422    pub pitch: f32,
14423    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14424    pub yaw: f32,
14425    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14426    pub pitch_rate: f32,
14427    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14428    pub yaw_rate: f32,
14429    #[doc = "System ID"]
14430    pub target_system: u8,
14431    #[doc = "Component ID"]
14432    pub target_component: u8,
14433    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14434    pub gimbal_device_id: u8,
14435}
14436impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14437    pub const ENCODED_LEN: usize = 23usize;
14438    pub const DEFAULT: Self = Self {
14439        flags: GimbalManagerFlags::DEFAULT,
14440        pitch: 0.0_f32,
14441        yaw: 0.0_f32,
14442        pitch_rate: 0.0_f32,
14443        yaw_rate: 0.0_f32,
14444        target_system: 0_u8,
14445        target_component: 0_u8,
14446        gimbal_device_id: 0_u8,
14447    };
14448    #[cfg(feature = "arbitrary")]
14449    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14450        use arbitrary::{Arbitrary, Unstructured};
14451        let mut buf = [0u8; 1024];
14452        rng.fill_bytes(&mut buf);
14453        let mut unstructured = Unstructured::new(&buf);
14454        Self::arbitrary(&mut unstructured).unwrap_or_default()
14455    }
14456}
14457impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14458    fn default() -> Self {
14459        Self::DEFAULT.clone()
14460    }
14461}
14462impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14463    type Message = MavMessage;
14464    const ID: u32 = 288u32;
14465    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
14466    const EXTRA_CRC: u8 = 20u8;
14467    const ENCODED_LEN: usize = 23usize;
14468    fn deser(
14469        _version: MavlinkVersion,
14470        __input: &[u8],
14471    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14472        let avail_len = __input.len();
14473        let mut payload_buf = [0; Self::ENCODED_LEN];
14474        let mut buf = if avail_len < Self::ENCODED_LEN {
14475            payload_buf[0..avail_len].copy_from_slice(__input);
14476            Bytes::new(&payload_buf)
14477        } else {
14478            Bytes::new(__input)
14479        };
14480        let mut __struct = Self::default();
14481        let tmp = buf.get_u32_le();
14482        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
14483            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14484                flag_type: "GimbalManagerFlags",
14485                value: tmp as u32,
14486            })?;
14487        __struct.pitch = buf.get_f32_le();
14488        __struct.yaw = buf.get_f32_le();
14489        __struct.pitch_rate = buf.get_f32_le();
14490        __struct.yaw_rate = buf.get_f32_le();
14491        __struct.target_system = buf.get_u8();
14492        __struct.target_component = buf.get_u8();
14493        __struct.gimbal_device_id = buf.get_u8();
14494        Ok(__struct)
14495    }
14496    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14497        let mut __tmp = BytesMut::new(bytes);
14498        #[allow(clippy::absurd_extreme_comparisons)]
14499        #[allow(unused_comparisons)]
14500        if __tmp.remaining() < Self::ENCODED_LEN {
14501            panic!(
14502                "buffer is too small (need {} bytes, but got {})",
14503                Self::ENCODED_LEN,
14504                __tmp.remaining(),
14505            )
14506        }
14507        __tmp.put_u32_le(self.flags.bits());
14508        __tmp.put_f32_le(self.pitch);
14509        __tmp.put_f32_le(self.yaw);
14510        __tmp.put_f32_le(self.pitch_rate);
14511        __tmp.put_f32_le(self.yaw_rate);
14512        __tmp.put_u8(self.target_system);
14513        __tmp.put_u8(self.target_component);
14514        __tmp.put_u8(self.gimbal_device_id);
14515        if matches!(version, MavlinkVersion::V2) {
14516            let len = __tmp.len();
14517            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14518        } else {
14519            __tmp.len()
14520        }
14521    }
14522}
14523#[doc = "id: 144"]
14524#[doc = "Current motion information from a designated system."]
14525#[derive(Debug, Clone, PartialEq)]
14526#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14527#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14528pub struct FOLLOW_TARGET_DATA {
14529    #[doc = "Timestamp (time since system boot)."]
14530    pub timestamp: u64,
14531    #[doc = "button states or switches of a tracker device"]
14532    pub custom_state: u64,
14533    #[doc = "Latitude (WGS84)"]
14534    pub lat: i32,
14535    #[doc = "Longitude (WGS84)"]
14536    pub lon: i32,
14537    #[doc = "Altitude (MSL)"]
14538    pub alt: f32,
14539    #[doc = "target velocity (0,0,0) for unknown"]
14540    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14541    pub vel: [f32; 3],
14542    #[doc = "linear target acceleration (0,0,0) for unknown"]
14543    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14544    pub acc: [f32; 3],
14545    #[doc = "(0 0 0 0 for unknown)"]
14546    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14547    pub attitude_q: [f32; 4],
14548    #[doc = "(0 0 0 for unknown)"]
14549    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14550    pub rates: [f32; 3],
14551    #[doc = "eph epv"]
14552    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14553    pub position_cov: [f32; 3],
14554    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
14555    pub est_capabilities: u8,
14556}
14557impl FOLLOW_TARGET_DATA {
14558    pub const ENCODED_LEN: usize = 93usize;
14559    pub const DEFAULT: Self = Self {
14560        timestamp: 0_u64,
14561        custom_state: 0_u64,
14562        lat: 0_i32,
14563        lon: 0_i32,
14564        alt: 0.0_f32,
14565        vel: [0.0_f32; 3usize],
14566        acc: [0.0_f32; 3usize],
14567        attitude_q: [0.0_f32; 4usize],
14568        rates: [0.0_f32; 3usize],
14569        position_cov: [0.0_f32; 3usize],
14570        est_capabilities: 0_u8,
14571    };
14572    #[cfg(feature = "arbitrary")]
14573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14574        use arbitrary::{Arbitrary, Unstructured};
14575        let mut buf = [0u8; 1024];
14576        rng.fill_bytes(&mut buf);
14577        let mut unstructured = Unstructured::new(&buf);
14578        Self::arbitrary(&mut unstructured).unwrap_or_default()
14579    }
14580}
14581impl Default for FOLLOW_TARGET_DATA {
14582    fn default() -> Self {
14583        Self::DEFAULT.clone()
14584    }
14585}
14586impl MessageData for FOLLOW_TARGET_DATA {
14587    type Message = MavMessage;
14588    const ID: u32 = 144u32;
14589    const NAME: &'static str = "FOLLOW_TARGET";
14590    const EXTRA_CRC: u8 = 127u8;
14591    const ENCODED_LEN: usize = 93usize;
14592    fn deser(
14593        _version: MavlinkVersion,
14594        __input: &[u8],
14595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14596        let avail_len = __input.len();
14597        let mut payload_buf = [0; Self::ENCODED_LEN];
14598        let mut buf = if avail_len < Self::ENCODED_LEN {
14599            payload_buf[0..avail_len].copy_from_slice(__input);
14600            Bytes::new(&payload_buf)
14601        } else {
14602            Bytes::new(__input)
14603        };
14604        let mut __struct = Self::default();
14605        __struct.timestamp = buf.get_u64_le();
14606        __struct.custom_state = buf.get_u64_le();
14607        __struct.lat = buf.get_i32_le();
14608        __struct.lon = buf.get_i32_le();
14609        __struct.alt = buf.get_f32_le();
14610        for v in &mut __struct.vel {
14611            let val = buf.get_f32_le();
14612            *v = val;
14613        }
14614        for v in &mut __struct.acc {
14615            let val = buf.get_f32_le();
14616            *v = val;
14617        }
14618        for v in &mut __struct.attitude_q {
14619            let val = buf.get_f32_le();
14620            *v = val;
14621        }
14622        for v in &mut __struct.rates {
14623            let val = buf.get_f32_le();
14624            *v = val;
14625        }
14626        for v in &mut __struct.position_cov {
14627            let val = buf.get_f32_le();
14628            *v = val;
14629        }
14630        __struct.est_capabilities = buf.get_u8();
14631        Ok(__struct)
14632    }
14633    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14634        let mut __tmp = BytesMut::new(bytes);
14635        #[allow(clippy::absurd_extreme_comparisons)]
14636        #[allow(unused_comparisons)]
14637        if __tmp.remaining() < Self::ENCODED_LEN {
14638            panic!(
14639                "buffer is too small (need {} bytes, but got {})",
14640                Self::ENCODED_LEN,
14641                __tmp.remaining(),
14642            )
14643        }
14644        __tmp.put_u64_le(self.timestamp);
14645        __tmp.put_u64_le(self.custom_state);
14646        __tmp.put_i32_le(self.lat);
14647        __tmp.put_i32_le(self.lon);
14648        __tmp.put_f32_le(self.alt);
14649        for val in &self.vel {
14650            __tmp.put_f32_le(*val);
14651        }
14652        for val in &self.acc {
14653            __tmp.put_f32_le(*val);
14654        }
14655        for val in &self.attitude_q {
14656            __tmp.put_f32_le(*val);
14657        }
14658        for val in &self.rates {
14659            __tmp.put_f32_le(*val);
14660        }
14661        for val in &self.position_cov {
14662            __tmp.put_f32_le(*val);
14663        }
14664        __tmp.put_u8(self.est_capabilities);
14665        if matches!(version, MavlinkVersion::V2) {
14666            let len = __tmp.len();
14667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14668        } else {
14669            __tmp.len()
14670        }
14671    }
14672}
14673#[doc = "id: 262"]
14674#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
14675#[derive(Debug, Clone, PartialEq)]
14676#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14677#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14678pub struct CAMERA_CAPTURE_STATUS_DATA {
14679    #[doc = "Timestamp (time since system boot)."]
14680    pub time_boot_ms: u32,
14681    #[doc = "Image capture interval"]
14682    pub image_interval: f32,
14683    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
14684    pub recording_time_ms: u32,
14685    #[doc = "Available storage capacity."]
14686    pub available_capacity: f32,
14687    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
14688    pub image_status: u8,
14689    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
14690    pub video_status: u8,
14691    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
14692    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14693    pub image_count: i32,
14694    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
14695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14696    pub camera_device_id: u8,
14697}
14698impl CAMERA_CAPTURE_STATUS_DATA {
14699    pub const ENCODED_LEN: usize = 23usize;
14700    pub const DEFAULT: Self = Self {
14701        time_boot_ms: 0_u32,
14702        image_interval: 0.0_f32,
14703        recording_time_ms: 0_u32,
14704        available_capacity: 0.0_f32,
14705        image_status: 0_u8,
14706        video_status: 0_u8,
14707        image_count: 0_i32,
14708        camera_device_id: 0_u8,
14709    };
14710    #[cfg(feature = "arbitrary")]
14711    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14712        use arbitrary::{Arbitrary, Unstructured};
14713        let mut buf = [0u8; 1024];
14714        rng.fill_bytes(&mut buf);
14715        let mut unstructured = Unstructured::new(&buf);
14716        Self::arbitrary(&mut unstructured).unwrap_or_default()
14717    }
14718}
14719impl Default for CAMERA_CAPTURE_STATUS_DATA {
14720    fn default() -> Self {
14721        Self::DEFAULT.clone()
14722    }
14723}
14724impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
14725    type Message = MavMessage;
14726    const ID: u32 = 262u32;
14727    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
14728    const EXTRA_CRC: u8 = 12u8;
14729    const ENCODED_LEN: usize = 23usize;
14730    fn deser(
14731        _version: MavlinkVersion,
14732        __input: &[u8],
14733    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14734        let avail_len = __input.len();
14735        let mut payload_buf = [0; Self::ENCODED_LEN];
14736        let mut buf = if avail_len < Self::ENCODED_LEN {
14737            payload_buf[0..avail_len].copy_from_slice(__input);
14738            Bytes::new(&payload_buf)
14739        } else {
14740            Bytes::new(__input)
14741        };
14742        let mut __struct = Self::default();
14743        __struct.time_boot_ms = buf.get_u32_le();
14744        __struct.image_interval = buf.get_f32_le();
14745        __struct.recording_time_ms = buf.get_u32_le();
14746        __struct.available_capacity = buf.get_f32_le();
14747        __struct.image_status = buf.get_u8();
14748        __struct.video_status = buf.get_u8();
14749        __struct.image_count = buf.get_i32_le();
14750        __struct.camera_device_id = buf.get_u8();
14751        Ok(__struct)
14752    }
14753    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14754        let mut __tmp = BytesMut::new(bytes);
14755        #[allow(clippy::absurd_extreme_comparisons)]
14756        #[allow(unused_comparisons)]
14757        if __tmp.remaining() < Self::ENCODED_LEN {
14758            panic!(
14759                "buffer is too small (need {} bytes, but got {})",
14760                Self::ENCODED_LEN,
14761                __tmp.remaining(),
14762            )
14763        }
14764        __tmp.put_u32_le(self.time_boot_ms);
14765        __tmp.put_f32_le(self.image_interval);
14766        __tmp.put_u32_le(self.recording_time_ms);
14767        __tmp.put_f32_le(self.available_capacity);
14768        __tmp.put_u8(self.image_status);
14769        __tmp.put_u8(self.video_status);
14770        __tmp.put_i32_le(self.image_count);
14771        __tmp.put_u8(self.camera_device_id);
14772        if matches!(version, MavlinkVersion::V2) {
14773            let len = __tmp.len();
14774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14775        } else {
14776            __tmp.len()
14777        }
14778    }
14779}
14780#[doc = "id: 69"]
14781#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
14782#[derive(Debug, Clone, PartialEq)]
14783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14784#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14785pub struct MANUAL_CONTROL_DATA {
14786    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
14787    pub x: i16,
14788    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
14789    pub y: i16,
14790    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
14791    pub z: i16,
14792    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
14793    pub r: i16,
14794    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
14795    pub buttons: u16,
14796    #[doc = "The system to be controlled."]
14797    pub target: u8,
14798    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
14799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14800    pub buttons2: u16,
14801    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
14802    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14803    pub enabled_extensions: u8,
14804    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
14805    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14806    pub s: i16,
14807    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
14808    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14809    pub t: i16,
14810    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
14811    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14812    pub aux1: i16,
14813    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
14814    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14815    pub aux2: i16,
14816    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
14817    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14818    pub aux3: i16,
14819    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
14820    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14821    pub aux4: i16,
14822    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
14823    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14824    pub aux5: i16,
14825    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
14826    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14827    pub aux6: i16,
14828}
14829impl MANUAL_CONTROL_DATA {
14830    pub const ENCODED_LEN: usize = 30usize;
14831    pub const DEFAULT: Self = Self {
14832        x: 0_i16,
14833        y: 0_i16,
14834        z: 0_i16,
14835        r: 0_i16,
14836        buttons: 0_u16,
14837        target: 0_u8,
14838        buttons2: 0_u16,
14839        enabled_extensions: 0_u8,
14840        s: 0_i16,
14841        t: 0_i16,
14842        aux1: 0_i16,
14843        aux2: 0_i16,
14844        aux3: 0_i16,
14845        aux4: 0_i16,
14846        aux5: 0_i16,
14847        aux6: 0_i16,
14848    };
14849    #[cfg(feature = "arbitrary")]
14850    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14851        use arbitrary::{Arbitrary, Unstructured};
14852        let mut buf = [0u8; 1024];
14853        rng.fill_bytes(&mut buf);
14854        let mut unstructured = Unstructured::new(&buf);
14855        Self::arbitrary(&mut unstructured).unwrap_or_default()
14856    }
14857}
14858impl Default for MANUAL_CONTROL_DATA {
14859    fn default() -> Self {
14860        Self::DEFAULT.clone()
14861    }
14862}
14863impl MessageData for MANUAL_CONTROL_DATA {
14864    type Message = MavMessage;
14865    const ID: u32 = 69u32;
14866    const NAME: &'static str = "MANUAL_CONTROL";
14867    const EXTRA_CRC: u8 = 243u8;
14868    const ENCODED_LEN: usize = 30usize;
14869    fn deser(
14870        _version: MavlinkVersion,
14871        __input: &[u8],
14872    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14873        let avail_len = __input.len();
14874        let mut payload_buf = [0; Self::ENCODED_LEN];
14875        let mut buf = if avail_len < Self::ENCODED_LEN {
14876            payload_buf[0..avail_len].copy_from_slice(__input);
14877            Bytes::new(&payload_buf)
14878        } else {
14879            Bytes::new(__input)
14880        };
14881        let mut __struct = Self::default();
14882        __struct.x = buf.get_i16_le();
14883        __struct.y = buf.get_i16_le();
14884        __struct.z = buf.get_i16_le();
14885        __struct.r = buf.get_i16_le();
14886        __struct.buttons = buf.get_u16_le();
14887        __struct.target = buf.get_u8();
14888        __struct.buttons2 = buf.get_u16_le();
14889        __struct.enabled_extensions = buf.get_u8();
14890        __struct.s = buf.get_i16_le();
14891        __struct.t = buf.get_i16_le();
14892        __struct.aux1 = buf.get_i16_le();
14893        __struct.aux2 = buf.get_i16_le();
14894        __struct.aux3 = buf.get_i16_le();
14895        __struct.aux4 = buf.get_i16_le();
14896        __struct.aux5 = buf.get_i16_le();
14897        __struct.aux6 = buf.get_i16_le();
14898        Ok(__struct)
14899    }
14900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14901        let mut __tmp = BytesMut::new(bytes);
14902        #[allow(clippy::absurd_extreme_comparisons)]
14903        #[allow(unused_comparisons)]
14904        if __tmp.remaining() < Self::ENCODED_LEN {
14905            panic!(
14906                "buffer is too small (need {} bytes, but got {})",
14907                Self::ENCODED_LEN,
14908                __tmp.remaining(),
14909            )
14910        }
14911        __tmp.put_i16_le(self.x);
14912        __tmp.put_i16_le(self.y);
14913        __tmp.put_i16_le(self.z);
14914        __tmp.put_i16_le(self.r);
14915        __tmp.put_u16_le(self.buttons);
14916        __tmp.put_u8(self.target);
14917        __tmp.put_u16_le(self.buttons2);
14918        __tmp.put_u8(self.enabled_extensions);
14919        __tmp.put_i16_le(self.s);
14920        __tmp.put_i16_le(self.t);
14921        __tmp.put_i16_le(self.aux1);
14922        __tmp.put_i16_le(self.aux2);
14923        __tmp.put_i16_le(self.aux3);
14924        __tmp.put_i16_le(self.aux4);
14925        __tmp.put_i16_le(self.aux5);
14926        __tmp.put_i16_le(self.aux6);
14927        if matches!(version, MavlinkVersion::V2) {
14928            let len = __tmp.len();
14929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14930        } else {
14931            __tmp.len()
14932        }
14933    }
14934}
14935#[doc = "id: 390"]
14936#[doc = "Hardware status sent by an onboard computer."]
14937#[derive(Debug, Clone, PartialEq)]
14938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14940pub struct ONBOARD_COMPUTER_STATUS_DATA {
14941    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14942    pub time_usec: u64,
14943    #[doc = "Time since system boot."]
14944    pub uptime: u32,
14945    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
14946    pub ram_usage: u32,
14947    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
14948    pub ram_total: u32,
14949    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
14950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14951    pub storage_type: [u32; 4],
14952    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
14953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14954    pub storage_usage: [u32; 4],
14955    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
14956    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14957    pub storage_total: [u32; 4],
14958    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
14959    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14960    pub link_type: [u32; 6],
14961    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
14962    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14963    pub link_tx_rate: [u32; 6],
14964    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
14965    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14966    pub link_rx_rate: [u32; 6],
14967    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
14968    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14969    pub link_tx_max: [u32; 6],
14970    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
14971    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14972    pub link_rx_max: [u32; 6],
14973    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
14974    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14975    pub fan_speed: [i16; 4],
14976    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
14977    pub mavtype: u8,
14978    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
14979    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14980    pub cpu_cores: [u8; 8],
14981    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
14982    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14983    pub cpu_combined: [u8; 10],
14984    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
14985    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14986    pub gpu_cores: [u8; 4],
14987    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
14988    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14989    pub gpu_combined: [u8; 10],
14990    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
14991    pub temperature_board: i8,
14992    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
14993    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14994    pub temperature_core: [i8; 8],
14995}
14996impl ONBOARD_COMPUTER_STATUS_DATA {
14997    pub const ENCODED_LEN: usize = 238usize;
14998    pub const DEFAULT: Self = Self {
14999        time_usec: 0_u64,
15000        uptime: 0_u32,
15001        ram_usage: 0_u32,
15002        ram_total: 0_u32,
15003        storage_type: [0_u32; 4usize],
15004        storage_usage: [0_u32; 4usize],
15005        storage_total: [0_u32; 4usize],
15006        link_type: [0_u32; 6usize],
15007        link_tx_rate: [0_u32; 6usize],
15008        link_rx_rate: [0_u32; 6usize],
15009        link_tx_max: [0_u32; 6usize],
15010        link_rx_max: [0_u32; 6usize],
15011        fan_speed: [0_i16; 4usize],
15012        mavtype: 0_u8,
15013        cpu_cores: [0_u8; 8usize],
15014        cpu_combined: [0_u8; 10usize],
15015        gpu_cores: [0_u8; 4usize],
15016        gpu_combined: [0_u8; 10usize],
15017        temperature_board: 0_i8,
15018        temperature_core: [0_i8; 8usize],
15019    };
15020    #[cfg(feature = "arbitrary")]
15021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15022        use arbitrary::{Arbitrary, Unstructured};
15023        let mut buf = [0u8; 1024];
15024        rng.fill_bytes(&mut buf);
15025        let mut unstructured = Unstructured::new(&buf);
15026        Self::arbitrary(&mut unstructured).unwrap_or_default()
15027    }
15028}
15029impl Default for ONBOARD_COMPUTER_STATUS_DATA {
15030    fn default() -> Self {
15031        Self::DEFAULT.clone()
15032    }
15033}
15034impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
15035    type Message = MavMessage;
15036    const ID: u32 = 390u32;
15037    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
15038    const EXTRA_CRC: u8 = 156u8;
15039    const ENCODED_LEN: usize = 238usize;
15040    fn deser(
15041        _version: MavlinkVersion,
15042        __input: &[u8],
15043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15044        let avail_len = __input.len();
15045        let mut payload_buf = [0; Self::ENCODED_LEN];
15046        let mut buf = if avail_len < Self::ENCODED_LEN {
15047            payload_buf[0..avail_len].copy_from_slice(__input);
15048            Bytes::new(&payload_buf)
15049        } else {
15050            Bytes::new(__input)
15051        };
15052        let mut __struct = Self::default();
15053        __struct.time_usec = buf.get_u64_le();
15054        __struct.uptime = buf.get_u32_le();
15055        __struct.ram_usage = buf.get_u32_le();
15056        __struct.ram_total = buf.get_u32_le();
15057        for v in &mut __struct.storage_type {
15058            let val = buf.get_u32_le();
15059            *v = val;
15060        }
15061        for v in &mut __struct.storage_usage {
15062            let val = buf.get_u32_le();
15063            *v = val;
15064        }
15065        for v in &mut __struct.storage_total {
15066            let val = buf.get_u32_le();
15067            *v = val;
15068        }
15069        for v in &mut __struct.link_type {
15070            let val = buf.get_u32_le();
15071            *v = val;
15072        }
15073        for v in &mut __struct.link_tx_rate {
15074            let val = buf.get_u32_le();
15075            *v = val;
15076        }
15077        for v in &mut __struct.link_rx_rate {
15078            let val = buf.get_u32_le();
15079            *v = val;
15080        }
15081        for v in &mut __struct.link_tx_max {
15082            let val = buf.get_u32_le();
15083            *v = val;
15084        }
15085        for v in &mut __struct.link_rx_max {
15086            let val = buf.get_u32_le();
15087            *v = val;
15088        }
15089        for v in &mut __struct.fan_speed {
15090            let val = buf.get_i16_le();
15091            *v = val;
15092        }
15093        __struct.mavtype = buf.get_u8();
15094        for v in &mut __struct.cpu_cores {
15095            let val = buf.get_u8();
15096            *v = val;
15097        }
15098        for v in &mut __struct.cpu_combined {
15099            let val = buf.get_u8();
15100            *v = val;
15101        }
15102        for v in &mut __struct.gpu_cores {
15103            let val = buf.get_u8();
15104            *v = val;
15105        }
15106        for v in &mut __struct.gpu_combined {
15107            let val = buf.get_u8();
15108            *v = val;
15109        }
15110        __struct.temperature_board = buf.get_i8();
15111        for v in &mut __struct.temperature_core {
15112            let val = buf.get_i8();
15113            *v = val;
15114        }
15115        Ok(__struct)
15116    }
15117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15118        let mut __tmp = BytesMut::new(bytes);
15119        #[allow(clippy::absurd_extreme_comparisons)]
15120        #[allow(unused_comparisons)]
15121        if __tmp.remaining() < Self::ENCODED_LEN {
15122            panic!(
15123                "buffer is too small (need {} bytes, but got {})",
15124                Self::ENCODED_LEN,
15125                __tmp.remaining(),
15126            )
15127        }
15128        __tmp.put_u64_le(self.time_usec);
15129        __tmp.put_u32_le(self.uptime);
15130        __tmp.put_u32_le(self.ram_usage);
15131        __tmp.put_u32_le(self.ram_total);
15132        for val in &self.storage_type {
15133            __tmp.put_u32_le(*val);
15134        }
15135        for val in &self.storage_usage {
15136            __tmp.put_u32_le(*val);
15137        }
15138        for val in &self.storage_total {
15139            __tmp.put_u32_le(*val);
15140        }
15141        for val in &self.link_type {
15142            __tmp.put_u32_le(*val);
15143        }
15144        for val in &self.link_tx_rate {
15145            __tmp.put_u32_le(*val);
15146        }
15147        for val in &self.link_rx_rate {
15148            __tmp.put_u32_le(*val);
15149        }
15150        for val in &self.link_tx_max {
15151            __tmp.put_u32_le(*val);
15152        }
15153        for val in &self.link_rx_max {
15154            __tmp.put_u32_le(*val);
15155        }
15156        for val in &self.fan_speed {
15157            __tmp.put_i16_le(*val);
15158        }
15159        __tmp.put_u8(self.mavtype);
15160        for val in &self.cpu_cores {
15161            __tmp.put_u8(*val);
15162        }
15163        for val in &self.cpu_combined {
15164            __tmp.put_u8(*val);
15165        }
15166        for val in &self.gpu_cores {
15167            __tmp.put_u8(*val);
15168        }
15169        for val in &self.gpu_combined {
15170            __tmp.put_u8(*val);
15171        }
15172        __tmp.put_i8(self.temperature_board);
15173        for val in &self.temperature_core {
15174            __tmp.put_i8(*val);
15175        }
15176        if matches!(version, MavlinkVersion::V2) {
15177            let len = __tmp.len();
15178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15179        } else {
15180            __tmp.len()
15181        }
15182    }
15183}
15184#[doc = "id: 258"]
15185#[doc = "Control vehicle tone generation (buzzer)."]
15186#[derive(Debug, Clone, PartialEq)]
15187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15189pub struct PLAY_TUNE_DATA {
15190    #[doc = "System ID"]
15191    pub target_system: u8,
15192    #[doc = "Component ID"]
15193    pub target_component: u8,
15194    #[doc = "tune in board specific format"]
15195    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15196    pub tune: [u8; 30],
15197    #[doc = "tune extension (appended to tune)"]
15198    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15199    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15200    pub tune2: [u8; 200],
15201}
15202impl PLAY_TUNE_DATA {
15203    pub const ENCODED_LEN: usize = 232usize;
15204    pub const DEFAULT: Self = Self {
15205        target_system: 0_u8,
15206        target_component: 0_u8,
15207        tune: [0_u8; 30usize],
15208        tune2: [0_u8; 200usize],
15209    };
15210    #[cfg(feature = "arbitrary")]
15211    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15212        use arbitrary::{Arbitrary, Unstructured};
15213        let mut buf = [0u8; 1024];
15214        rng.fill_bytes(&mut buf);
15215        let mut unstructured = Unstructured::new(&buf);
15216        Self::arbitrary(&mut unstructured).unwrap_or_default()
15217    }
15218}
15219impl Default for PLAY_TUNE_DATA {
15220    fn default() -> Self {
15221        Self::DEFAULT.clone()
15222    }
15223}
15224impl MessageData for PLAY_TUNE_DATA {
15225    type Message = MavMessage;
15226    const ID: u32 = 258u32;
15227    const NAME: &'static str = "PLAY_TUNE";
15228    const EXTRA_CRC: u8 = 187u8;
15229    const ENCODED_LEN: usize = 232usize;
15230    fn deser(
15231        _version: MavlinkVersion,
15232        __input: &[u8],
15233    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15234        let avail_len = __input.len();
15235        let mut payload_buf = [0; Self::ENCODED_LEN];
15236        let mut buf = if avail_len < Self::ENCODED_LEN {
15237            payload_buf[0..avail_len].copy_from_slice(__input);
15238            Bytes::new(&payload_buf)
15239        } else {
15240            Bytes::new(__input)
15241        };
15242        let mut __struct = Self::default();
15243        __struct.target_system = buf.get_u8();
15244        __struct.target_component = buf.get_u8();
15245        for v in &mut __struct.tune {
15246            let val = buf.get_u8();
15247            *v = val;
15248        }
15249        for v in &mut __struct.tune2 {
15250            let val = buf.get_u8();
15251            *v = val;
15252        }
15253        Ok(__struct)
15254    }
15255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15256        let mut __tmp = BytesMut::new(bytes);
15257        #[allow(clippy::absurd_extreme_comparisons)]
15258        #[allow(unused_comparisons)]
15259        if __tmp.remaining() < Self::ENCODED_LEN {
15260            panic!(
15261                "buffer is too small (need {} bytes, but got {})",
15262                Self::ENCODED_LEN,
15263                __tmp.remaining(),
15264            )
15265        }
15266        __tmp.put_u8(self.target_system);
15267        __tmp.put_u8(self.target_component);
15268        for val in &self.tune {
15269            __tmp.put_u8(*val);
15270        }
15271        for val in &self.tune2 {
15272            __tmp.put_u8(*val);
15273        }
15274        if matches!(version, MavlinkVersion::V2) {
15275            let len = __tmp.len();
15276            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15277        } else {
15278            __tmp.len()
15279        }
15280    }
15281}
15282#[doc = "id: 32"]
15283#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
15284#[derive(Debug, Clone, PartialEq)]
15285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15287pub struct LOCAL_POSITION_NED_DATA {
15288    #[doc = "Timestamp (time since system boot)."]
15289    pub time_boot_ms: u32,
15290    #[doc = "X Position"]
15291    pub x: f32,
15292    #[doc = "Y Position"]
15293    pub y: f32,
15294    #[doc = "Z Position"]
15295    pub z: f32,
15296    #[doc = "X Speed"]
15297    pub vx: f32,
15298    #[doc = "Y Speed"]
15299    pub vy: f32,
15300    #[doc = "Z Speed"]
15301    pub vz: f32,
15302}
15303impl LOCAL_POSITION_NED_DATA {
15304    pub const ENCODED_LEN: usize = 28usize;
15305    pub const DEFAULT: Self = Self {
15306        time_boot_ms: 0_u32,
15307        x: 0.0_f32,
15308        y: 0.0_f32,
15309        z: 0.0_f32,
15310        vx: 0.0_f32,
15311        vy: 0.0_f32,
15312        vz: 0.0_f32,
15313    };
15314    #[cfg(feature = "arbitrary")]
15315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15316        use arbitrary::{Arbitrary, Unstructured};
15317        let mut buf = [0u8; 1024];
15318        rng.fill_bytes(&mut buf);
15319        let mut unstructured = Unstructured::new(&buf);
15320        Self::arbitrary(&mut unstructured).unwrap_or_default()
15321    }
15322}
15323impl Default for LOCAL_POSITION_NED_DATA {
15324    fn default() -> Self {
15325        Self::DEFAULT.clone()
15326    }
15327}
15328impl MessageData for LOCAL_POSITION_NED_DATA {
15329    type Message = MavMessage;
15330    const ID: u32 = 32u32;
15331    const NAME: &'static str = "LOCAL_POSITION_NED";
15332    const EXTRA_CRC: u8 = 185u8;
15333    const ENCODED_LEN: usize = 28usize;
15334    fn deser(
15335        _version: MavlinkVersion,
15336        __input: &[u8],
15337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15338        let avail_len = __input.len();
15339        let mut payload_buf = [0; Self::ENCODED_LEN];
15340        let mut buf = if avail_len < Self::ENCODED_LEN {
15341            payload_buf[0..avail_len].copy_from_slice(__input);
15342            Bytes::new(&payload_buf)
15343        } else {
15344            Bytes::new(__input)
15345        };
15346        let mut __struct = Self::default();
15347        __struct.time_boot_ms = buf.get_u32_le();
15348        __struct.x = buf.get_f32_le();
15349        __struct.y = buf.get_f32_le();
15350        __struct.z = buf.get_f32_le();
15351        __struct.vx = buf.get_f32_le();
15352        __struct.vy = buf.get_f32_le();
15353        __struct.vz = buf.get_f32_le();
15354        Ok(__struct)
15355    }
15356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15357        let mut __tmp = BytesMut::new(bytes);
15358        #[allow(clippy::absurd_extreme_comparisons)]
15359        #[allow(unused_comparisons)]
15360        if __tmp.remaining() < Self::ENCODED_LEN {
15361            panic!(
15362                "buffer is too small (need {} bytes, but got {})",
15363                Self::ENCODED_LEN,
15364                __tmp.remaining(),
15365            )
15366        }
15367        __tmp.put_u32_le(self.time_boot_ms);
15368        __tmp.put_f32_le(self.x);
15369        __tmp.put_f32_le(self.y);
15370        __tmp.put_f32_le(self.z);
15371        __tmp.put_f32_le(self.vx);
15372        __tmp.put_f32_le(self.vy);
15373        __tmp.put_f32_le(self.vz);
15374        if matches!(version, MavlinkVersion::V2) {
15375            let len = __tmp.len();
15376            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15377        } else {
15378            __tmp.len()
15379        }
15380    }
15381}
15382#[doc = "id: 37"]
15383#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
15384#[derive(Debug, Clone, PartialEq)]
15385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15387pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
15388    #[doc = "Start index"]
15389    pub start_index: i16,
15390    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
15391    pub end_index: i16,
15392    #[doc = "System ID"]
15393    pub target_system: u8,
15394    #[doc = "Component ID"]
15395    pub target_component: u8,
15396    #[doc = "Mission type."]
15397    #[cfg_attr(feature = "serde", serde(default))]
15398    pub mission_type: MavMissionType,
15399}
15400impl MISSION_REQUEST_PARTIAL_LIST_DATA {
15401    pub const ENCODED_LEN: usize = 7usize;
15402    pub const DEFAULT: Self = Self {
15403        start_index: 0_i16,
15404        end_index: 0_i16,
15405        target_system: 0_u8,
15406        target_component: 0_u8,
15407        mission_type: MavMissionType::DEFAULT,
15408    };
15409    #[cfg(feature = "arbitrary")]
15410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15411        use arbitrary::{Arbitrary, Unstructured};
15412        let mut buf = [0u8; 1024];
15413        rng.fill_bytes(&mut buf);
15414        let mut unstructured = Unstructured::new(&buf);
15415        Self::arbitrary(&mut unstructured).unwrap_or_default()
15416    }
15417}
15418impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
15419    fn default() -> Self {
15420        Self::DEFAULT.clone()
15421    }
15422}
15423impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
15424    type Message = MavMessage;
15425    const ID: u32 = 37u32;
15426    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
15427    const EXTRA_CRC: u8 = 212u8;
15428    const ENCODED_LEN: usize = 7usize;
15429    fn deser(
15430        _version: MavlinkVersion,
15431        __input: &[u8],
15432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15433        let avail_len = __input.len();
15434        let mut payload_buf = [0; Self::ENCODED_LEN];
15435        let mut buf = if avail_len < Self::ENCODED_LEN {
15436            payload_buf[0..avail_len].copy_from_slice(__input);
15437            Bytes::new(&payload_buf)
15438        } else {
15439            Bytes::new(__input)
15440        };
15441        let mut __struct = Self::default();
15442        __struct.start_index = buf.get_i16_le();
15443        __struct.end_index = buf.get_i16_le();
15444        __struct.target_system = buf.get_u8();
15445        __struct.target_component = buf.get_u8();
15446        let tmp = buf.get_u8();
15447        __struct.mission_type =
15448            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15449                enum_type: "MavMissionType",
15450                value: tmp as u32,
15451            })?;
15452        Ok(__struct)
15453    }
15454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15455        let mut __tmp = BytesMut::new(bytes);
15456        #[allow(clippy::absurd_extreme_comparisons)]
15457        #[allow(unused_comparisons)]
15458        if __tmp.remaining() < Self::ENCODED_LEN {
15459            panic!(
15460                "buffer is too small (need {} bytes, but got {})",
15461                Self::ENCODED_LEN,
15462                __tmp.remaining(),
15463            )
15464        }
15465        __tmp.put_i16_le(self.start_index);
15466        __tmp.put_i16_le(self.end_index);
15467        __tmp.put_u8(self.target_system);
15468        __tmp.put_u8(self.target_component);
15469        __tmp.put_u8(self.mission_type as u8);
15470        if matches!(version, MavlinkVersion::V2) {
15471            let len = __tmp.len();
15472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15473        } else {
15474            __tmp.len()
15475        }
15476    }
15477}
15478#[doc = "id: 66"]
15479#[doc = "Request a data stream."]
15480#[derive(Debug, Clone, PartialEq)]
15481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15483pub struct REQUEST_DATA_STREAM_DATA {
15484    #[doc = "The requested message rate"]
15485    pub req_message_rate: u16,
15486    #[doc = "The target requested to send the message stream."]
15487    pub target_system: u8,
15488    #[doc = "The target requested to send the message stream."]
15489    pub target_component: u8,
15490    #[doc = "The ID of the requested data stream"]
15491    pub req_stream_id: u8,
15492    #[doc = "1 to start sending, 0 to stop sending."]
15493    pub start_stop: u8,
15494}
15495impl REQUEST_DATA_STREAM_DATA {
15496    pub const ENCODED_LEN: usize = 6usize;
15497    pub const DEFAULT: Self = Self {
15498        req_message_rate: 0_u16,
15499        target_system: 0_u8,
15500        target_component: 0_u8,
15501        req_stream_id: 0_u8,
15502        start_stop: 0_u8,
15503    };
15504    #[cfg(feature = "arbitrary")]
15505    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15506        use arbitrary::{Arbitrary, Unstructured};
15507        let mut buf = [0u8; 1024];
15508        rng.fill_bytes(&mut buf);
15509        let mut unstructured = Unstructured::new(&buf);
15510        Self::arbitrary(&mut unstructured).unwrap_or_default()
15511    }
15512}
15513impl Default for REQUEST_DATA_STREAM_DATA {
15514    fn default() -> Self {
15515        Self::DEFAULT.clone()
15516    }
15517}
15518impl MessageData for REQUEST_DATA_STREAM_DATA {
15519    type Message = MavMessage;
15520    const ID: u32 = 66u32;
15521    const NAME: &'static str = "REQUEST_DATA_STREAM";
15522    const EXTRA_CRC: u8 = 148u8;
15523    const ENCODED_LEN: usize = 6usize;
15524    fn deser(
15525        _version: MavlinkVersion,
15526        __input: &[u8],
15527    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15528        let avail_len = __input.len();
15529        let mut payload_buf = [0; Self::ENCODED_LEN];
15530        let mut buf = if avail_len < Self::ENCODED_LEN {
15531            payload_buf[0..avail_len].copy_from_slice(__input);
15532            Bytes::new(&payload_buf)
15533        } else {
15534            Bytes::new(__input)
15535        };
15536        let mut __struct = Self::default();
15537        __struct.req_message_rate = buf.get_u16_le();
15538        __struct.target_system = buf.get_u8();
15539        __struct.target_component = buf.get_u8();
15540        __struct.req_stream_id = buf.get_u8();
15541        __struct.start_stop = buf.get_u8();
15542        Ok(__struct)
15543    }
15544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15545        let mut __tmp = BytesMut::new(bytes);
15546        #[allow(clippy::absurd_extreme_comparisons)]
15547        #[allow(unused_comparisons)]
15548        if __tmp.remaining() < Self::ENCODED_LEN {
15549            panic!(
15550                "buffer is too small (need {} bytes, but got {})",
15551                Self::ENCODED_LEN,
15552                __tmp.remaining(),
15553            )
15554        }
15555        __tmp.put_u16_le(self.req_message_rate);
15556        __tmp.put_u8(self.target_system);
15557        __tmp.put_u8(self.target_component);
15558        __tmp.put_u8(self.req_stream_id);
15559        __tmp.put_u8(self.start_stop);
15560        if matches!(version, MavlinkVersion::V2) {
15561            let len = __tmp.len();
15562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15563        } else {
15564            __tmp.len()
15565        }
15566    }
15567}
15568#[doc = "id: 400"]
15569#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
15570#[derive(Debug, Clone, PartialEq)]
15571#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15573pub struct PLAY_TUNE_V2_DATA {
15574    #[doc = "Tune format"]
15575    pub format: TuneFormat,
15576    #[doc = "System ID"]
15577    pub target_system: u8,
15578    #[doc = "Component ID"]
15579    pub target_component: u8,
15580    #[doc = "Tune definition as a NULL-terminated string."]
15581    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15582    pub tune: [u8; 248],
15583}
15584impl PLAY_TUNE_V2_DATA {
15585    pub const ENCODED_LEN: usize = 254usize;
15586    pub const DEFAULT: Self = Self {
15587        format: TuneFormat::DEFAULT,
15588        target_system: 0_u8,
15589        target_component: 0_u8,
15590        tune: [0_u8; 248usize],
15591    };
15592    #[cfg(feature = "arbitrary")]
15593    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15594        use arbitrary::{Arbitrary, Unstructured};
15595        let mut buf = [0u8; 1024];
15596        rng.fill_bytes(&mut buf);
15597        let mut unstructured = Unstructured::new(&buf);
15598        Self::arbitrary(&mut unstructured).unwrap_or_default()
15599    }
15600}
15601impl Default for PLAY_TUNE_V2_DATA {
15602    fn default() -> Self {
15603        Self::DEFAULT.clone()
15604    }
15605}
15606impl MessageData for PLAY_TUNE_V2_DATA {
15607    type Message = MavMessage;
15608    const ID: u32 = 400u32;
15609    const NAME: &'static str = "PLAY_TUNE_V2";
15610    const EXTRA_CRC: u8 = 110u8;
15611    const ENCODED_LEN: usize = 254usize;
15612    fn deser(
15613        _version: MavlinkVersion,
15614        __input: &[u8],
15615    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15616        let avail_len = __input.len();
15617        let mut payload_buf = [0; Self::ENCODED_LEN];
15618        let mut buf = if avail_len < Self::ENCODED_LEN {
15619            payload_buf[0..avail_len].copy_from_slice(__input);
15620            Bytes::new(&payload_buf)
15621        } else {
15622            Bytes::new(__input)
15623        };
15624        let mut __struct = Self::default();
15625        let tmp = buf.get_u32_le();
15626        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
15627            ::mavlink_core::error::ParserError::InvalidEnum {
15628                enum_type: "TuneFormat",
15629                value: tmp as u32,
15630            },
15631        )?;
15632        __struct.target_system = buf.get_u8();
15633        __struct.target_component = buf.get_u8();
15634        for v in &mut __struct.tune {
15635            let val = buf.get_u8();
15636            *v = val;
15637        }
15638        Ok(__struct)
15639    }
15640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15641        let mut __tmp = BytesMut::new(bytes);
15642        #[allow(clippy::absurd_extreme_comparisons)]
15643        #[allow(unused_comparisons)]
15644        if __tmp.remaining() < Self::ENCODED_LEN {
15645            panic!(
15646                "buffer is too small (need {} bytes, but got {})",
15647                Self::ENCODED_LEN,
15648                __tmp.remaining(),
15649            )
15650        }
15651        __tmp.put_u32_le(self.format as u32);
15652        __tmp.put_u8(self.target_system);
15653        __tmp.put_u8(self.target_component);
15654        for val in &self.tune {
15655            __tmp.put_u8(*val);
15656        }
15657        if matches!(version, MavlinkVersion::V2) {
15658            let len = __tmp.len();
15659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15660        } else {
15661            __tmp.len()
15662        }
15663    }
15664}
15665#[doc = "id: 339"]
15666#[doc = "RPM sensor data message."]
15667#[derive(Debug, Clone, PartialEq)]
15668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15670pub struct RAW_RPM_DATA {
15671    #[doc = "Indicated rate"]
15672    pub frequency: f32,
15673    #[doc = "Index of this RPM sensor (0-indexed)"]
15674    pub index: u8,
15675}
15676impl RAW_RPM_DATA {
15677    pub const ENCODED_LEN: usize = 5usize;
15678    pub const DEFAULT: Self = Self {
15679        frequency: 0.0_f32,
15680        index: 0_u8,
15681    };
15682    #[cfg(feature = "arbitrary")]
15683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15684        use arbitrary::{Arbitrary, Unstructured};
15685        let mut buf = [0u8; 1024];
15686        rng.fill_bytes(&mut buf);
15687        let mut unstructured = Unstructured::new(&buf);
15688        Self::arbitrary(&mut unstructured).unwrap_or_default()
15689    }
15690}
15691impl Default for RAW_RPM_DATA {
15692    fn default() -> Self {
15693        Self::DEFAULT.clone()
15694    }
15695}
15696impl MessageData for RAW_RPM_DATA {
15697    type Message = MavMessage;
15698    const ID: u32 = 339u32;
15699    const NAME: &'static str = "RAW_RPM";
15700    const EXTRA_CRC: u8 = 199u8;
15701    const ENCODED_LEN: usize = 5usize;
15702    fn deser(
15703        _version: MavlinkVersion,
15704        __input: &[u8],
15705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15706        let avail_len = __input.len();
15707        let mut payload_buf = [0; Self::ENCODED_LEN];
15708        let mut buf = if avail_len < Self::ENCODED_LEN {
15709            payload_buf[0..avail_len].copy_from_slice(__input);
15710            Bytes::new(&payload_buf)
15711        } else {
15712            Bytes::new(__input)
15713        };
15714        let mut __struct = Self::default();
15715        __struct.frequency = buf.get_f32_le();
15716        __struct.index = buf.get_u8();
15717        Ok(__struct)
15718    }
15719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15720        let mut __tmp = BytesMut::new(bytes);
15721        #[allow(clippy::absurd_extreme_comparisons)]
15722        #[allow(unused_comparisons)]
15723        if __tmp.remaining() < Self::ENCODED_LEN {
15724            panic!(
15725                "buffer is too small (need {} bytes, but got {})",
15726                Self::ENCODED_LEN,
15727                __tmp.remaining(),
15728            )
15729        }
15730        __tmp.put_f32_le(self.frequency);
15731        __tmp.put_u8(self.index);
15732        if matches!(version, MavlinkVersion::V2) {
15733            let len = __tmp.len();
15734            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15735        } else {
15736            __tmp.len()
15737        }
15738    }
15739}
15740#[doc = "id: 112"]
15741#[doc = "Camera-IMU triggering and synchronisation message."]
15742#[derive(Debug, Clone, PartialEq)]
15743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15745pub struct CAMERA_TRIGGER_DATA {
15746    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15747    pub time_usec: u64,
15748    #[doc = "Image frame sequence"]
15749    pub seq: u32,
15750}
15751impl CAMERA_TRIGGER_DATA {
15752    pub const ENCODED_LEN: usize = 12usize;
15753    pub const DEFAULT: Self = Self {
15754        time_usec: 0_u64,
15755        seq: 0_u32,
15756    };
15757    #[cfg(feature = "arbitrary")]
15758    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15759        use arbitrary::{Arbitrary, Unstructured};
15760        let mut buf = [0u8; 1024];
15761        rng.fill_bytes(&mut buf);
15762        let mut unstructured = Unstructured::new(&buf);
15763        Self::arbitrary(&mut unstructured).unwrap_or_default()
15764    }
15765}
15766impl Default for CAMERA_TRIGGER_DATA {
15767    fn default() -> Self {
15768        Self::DEFAULT.clone()
15769    }
15770}
15771impl MessageData for CAMERA_TRIGGER_DATA {
15772    type Message = MavMessage;
15773    const ID: u32 = 112u32;
15774    const NAME: &'static str = "CAMERA_TRIGGER";
15775    const EXTRA_CRC: u8 = 174u8;
15776    const ENCODED_LEN: usize = 12usize;
15777    fn deser(
15778        _version: MavlinkVersion,
15779        __input: &[u8],
15780    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15781        let avail_len = __input.len();
15782        let mut payload_buf = [0; Self::ENCODED_LEN];
15783        let mut buf = if avail_len < Self::ENCODED_LEN {
15784            payload_buf[0..avail_len].copy_from_slice(__input);
15785            Bytes::new(&payload_buf)
15786        } else {
15787            Bytes::new(__input)
15788        };
15789        let mut __struct = Self::default();
15790        __struct.time_usec = buf.get_u64_le();
15791        __struct.seq = buf.get_u32_le();
15792        Ok(__struct)
15793    }
15794    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15795        let mut __tmp = BytesMut::new(bytes);
15796        #[allow(clippy::absurd_extreme_comparisons)]
15797        #[allow(unused_comparisons)]
15798        if __tmp.remaining() < Self::ENCODED_LEN {
15799            panic!(
15800                "buffer is too small (need {} bytes, but got {})",
15801                Self::ENCODED_LEN,
15802                __tmp.remaining(),
15803            )
15804        }
15805        __tmp.put_u64_le(self.time_usec);
15806        __tmp.put_u32_le(self.seq);
15807        if matches!(version, MavlinkVersion::V2) {
15808            let len = __tmp.len();
15809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15810        } else {
15811            __tmp.len()
15812        }
15813    }
15814}
15815#[doc = "id: 27"]
15816#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
15817#[derive(Debug, Clone, PartialEq)]
15818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15820pub struct RAW_IMU_DATA {
15821    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15822    pub time_usec: u64,
15823    #[doc = "X acceleration (raw)"]
15824    pub xacc: i16,
15825    #[doc = "Y acceleration (raw)"]
15826    pub yacc: i16,
15827    #[doc = "Z acceleration (raw)"]
15828    pub zacc: i16,
15829    #[doc = "Angular speed around X axis (raw)"]
15830    pub xgyro: i16,
15831    #[doc = "Angular speed around Y axis (raw)"]
15832    pub ygyro: i16,
15833    #[doc = "Angular speed around Z axis (raw)"]
15834    pub zgyro: i16,
15835    #[doc = "X Magnetic field (raw)"]
15836    pub xmag: i16,
15837    #[doc = "Y Magnetic field (raw)"]
15838    pub ymag: i16,
15839    #[doc = "Z Magnetic field (raw)"]
15840    pub zmag: i16,
15841    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15842    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15843    pub id: u8,
15844    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
15845    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15846    pub temperature: i16,
15847}
15848impl RAW_IMU_DATA {
15849    pub const ENCODED_LEN: usize = 29usize;
15850    pub const DEFAULT: Self = Self {
15851        time_usec: 0_u64,
15852        xacc: 0_i16,
15853        yacc: 0_i16,
15854        zacc: 0_i16,
15855        xgyro: 0_i16,
15856        ygyro: 0_i16,
15857        zgyro: 0_i16,
15858        xmag: 0_i16,
15859        ymag: 0_i16,
15860        zmag: 0_i16,
15861        id: 0_u8,
15862        temperature: 0_i16,
15863    };
15864    #[cfg(feature = "arbitrary")]
15865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15866        use arbitrary::{Arbitrary, Unstructured};
15867        let mut buf = [0u8; 1024];
15868        rng.fill_bytes(&mut buf);
15869        let mut unstructured = Unstructured::new(&buf);
15870        Self::arbitrary(&mut unstructured).unwrap_or_default()
15871    }
15872}
15873impl Default for RAW_IMU_DATA {
15874    fn default() -> Self {
15875        Self::DEFAULT.clone()
15876    }
15877}
15878impl MessageData for RAW_IMU_DATA {
15879    type Message = MavMessage;
15880    const ID: u32 = 27u32;
15881    const NAME: &'static str = "RAW_IMU";
15882    const EXTRA_CRC: u8 = 144u8;
15883    const ENCODED_LEN: usize = 29usize;
15884    fn deser(
15885        _version: MavlinkVersion,
15886        __input: &[u8],
15887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15888        let avail_len = __input.len();
15889        let mut payload_buf = [0; Self::ENCODED_LEN];
15890        let mut buf = if avail_len < Self::ENCODED_LEN {
15891            payload_buf[0..avail_len].copy_from_slice(__input);
15892            Bytes::new(&payload_buf)
15893        } else {
15894            Bytes::new(__input)
15895        };
15896        let mut __struct = Self::default();
15897        __struct.time_usec = buf.get_u64_le();
15898        __struct.xacc = buf.get_i16_le();
15899        __struct.yacc = buf.get_i16_le();
15900        __struct.zacc = buf.get_i16_le();
15901        __struct.xgyro = buf.get_i16_le();
15902        __struct.ygyro = buf.get_i16_le();
15903        __struct.zgyro = buf.get_i16_le();
15904        __struct.xmag = buf.get_i16_le();
15905        __struct.ymag = buf.get_i16_le();
15906        __struct.zmag = buf.get_i16_le();
15907        __struct.id = buf.get_u8();
15908        __struct.temperature = buf.get_i16_le();
15909        Ok(__struct)
15910    }
15911    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15912        let mut __tmp = BytesMut::new(bytes);
15913        #[allow(clippy::absurd_extreme_comparisons)]
15914        #[allow(unused_comparisons)]
15915        if __tmp.remaining() < Self::ENCODED_LEN {
15916            panic!(
15917                "buffer is too small (need {} bytes, but got {})",
15918                Self::ENCODED_LEN,
15919                __tmp.remaining(),
15920            )
15921        }
15922        __tmp.put_u64_le(self.time_usec);
15923        __tmp.put_i16_le(self.xacc);
15924        __tmp.put_i16_le(self.yacc);
15925        __tmp.put_i16_le(self.zacc);
15926        __tmp.put_i16_le(self.xgyro);
15927        __tmp.put_i16_le(self.ygyro);
15928        __tmp.put_i16_le(self.zgyro);
15929        __tmp.put_i16_le(self.xmag);
15930        __tmp.put_i16_le(self.ymag);
15931        __tmp.put_i16_le(self.zmag);
15932        __tmp.put_u8(self.id);
15933        __tmp.put_i16_le(self.temperature);
15934        if matches!(version, MavlinkVersion::V2) {
15935            let len = __tmp.len();
15936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15937        } else {
15938            __tmp.len()
15939        }
15940    }
15941}
15942#[doc = "id: 396"]
15943#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
15944#[derive(Debug, Clone, PartialEq)]
15945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15947pub struct COMPONENT_INFORMATION_BASIC_DATA {
15948    #[doc = "Component capability flags"]
15949    pub capabilities: MavProtocolCapability,
15950    #[doc = "Timestamp (time since system boot)."]
15951    pub time_boot_ms: u32,
15952    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
15953    pub time_manufacture_s: u32,
15954    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
15955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15956    pub vendor_name: [u8; 32],
15957    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
15958    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15959    pub model_name: [u8; 32],
15960    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
15961    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15962    pub software_version: [u8; 24],
15963    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
15964    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15965    pub hardware_version: [u8; 24],
15966    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
15967    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15968    pub serial_number: [u8; 32],
15969}
15970impl COMPONENT_INFORMATION_BASIC_DATA {
15971    pub const ENCODED_LEN: usize = 160usize;
15972    pub const DEFAULT: Self = Self {
15973        capabilities: MavProtocolCapability::DEFAULT,
15974        time_boot_ms: 0_u32,
15975        time_manufacture_s: 0_u32,
15976        vendor_name: [0_u8; 32usize],
15977        model_name: [0_u8; 32usize],
15978        software_version: [0_u8; 24usize],
15979        hardware_version: [0_u8; 24usize],
15980        serial_number: [0_u8; 32usize],
15981    };
15982    #[cfg(feature = "arbitrary")]
15983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15984        use arbitrary::{Arbitrary, Unstructured};
15985        let mut buf = [0u8; 1024];
15986        rng.fill_bytes(&mut buf);
15987        let mut unstructured = Unstructured::new(&buf);
15988        Self::arbitrary(&mut unstructured).unwrap_or_default()
15989    }
15990}
15991impl Default for COMPONENT_INFORMATION_BASIC_DATA {
15992    fn default() -> Self {
15993        Self::DEFAULT.clone()
15994    }
15995}
15996impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
15997    type Message = MavMessage;
15998    const ID: u32 = 396u32;
15999    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
16000    const EXTRA_CRC: u8 = 50u8;
16001    const ENCODED_LEN: usize = 160usize;
16002    fn deser(
16003        _version: MavlinkVersion,
16004        __input: &[u8],
16005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16006        let avail_len = __input.len();
16007        let mut payload_buf = [0; Self::ENCODED_LEN];
16008        let mut buf = if avail_len < Self::ENCODED_LEN {
16009            payload_buf[0..avail_len].copy_from_slice(__input);
16010            Bytes::new(&payload_buf)
16011        } else {
16012            Bytes::new(__input)
16013        };
16014        let mut __struct = Self::default();
16015        let tmp = buf.get_u64_le();
16016        __struct.capabilities = MavProtocolCapability::from_bits(
16017            tmp & MavProtocolCapability::all().bits(),
16018        )
16019        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16020            flag_type: "MavProtocolCapability",
16021            value: tmp as u32,
16022        })?;
16023        __struct.time_boot_ms = buf.get_u32_le();
16024        __struct.time_manufacture_s = buf.get_u32_le();
16025        for v in &mut __struct.vendor_name {
16026            let val = buf.get_u8();
16027            *v = val;
16028        }
16029        for v in &mut __struct.model_name {
16030            let val = buf.get_u8();
16031            *v = val;
16032        }
16033        for v in &mut __struct.software_version {
16034            let val = buf.get_u8();
16035            *v = val;
16036        }
16037        for v in &mut __struct.hardware_version {
16038            let val = buf.get_u8();
16039            *v = val;
16040        }
16041        for v in &mut __struct.serial_number {
16042            let val = buf.get_u8();
16043            *v = val;
16044        }
16045        Ok(__struct)
16046    }
16047    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16048        let mut __tmp = BytesMut::new(bytes);
16049        #[allow(clippy::absurd_extreme_comparisons)]
16050        #[allow(unused_comparisons)]
16051        if __tmp.remaining() < Self::ENCODED_LEN {
16052            panic!(
16053                "buffer is too small (need {} bytes, but got {})",
16054                Self::ENCODED_LEN,
16055                __tmp.remaining(),
16056            )
16057        }
16058        __tmp.put_u64_le(self.capabilities.bits());
16059        __tmp.put_u32_le(self.time_boot_ms);
16060        __tmp.put_u32_le(self.time_manufacture_s);
16061        for val in &self.vendor_name {
16062            __tmp.put_u8(*val);
16063        }
16064        for val in &self.model_name {
16065            __tmp.put_u8(*val);
16066        }
16067        for val in &self.software_version {
16068            __tmp.put_u8(*val);
16069        }
16070        for val in &self.hardware_version {
16071            __tmp.put_u8(*val);
16072        }
16073        for val in &self.serial_number {
16074            __tmp.put_u8(*val);
16075        }
16076        if matches!(version, MavlinkVersion::V2) {
16077            let len = __tmp.len();
16078            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16079        } else {
16080            __tmp.len()
16081        }
16082    }
16083}
16084#[doc = "id: 86"]
16085#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
16086#[derive(Debug, Clone, PartialEq)]
16087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16089pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
16090    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
16091    pub time_boot_ms: u32,
16092    #[doc = "Latitude in WGS84 frame"]
16093    pub lat_int: i32,
16094    #[doc = "Longitude in WGS84 frame"]
16095    pub lon_int: i32,
16096    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
16097    pub alt: f32,
16098    #[doc = "X velocity in NED frame"]
16099    pub vx: f32,
16100    #[doc = "Y velocity in NED frame"]
16101    pub vy: f32,
16102    #[doc = "Z velocity in NED frame"]
16103    pub vz: f32,
16104    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
16105    pub afx: f32,
16106    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
16107    pub afy: f32,
16108    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
16109    pub afz: f32,
16110    #[doc = "yaw setpoint"]
16111    pub yaw: f32,
16112    #[doc = "yaw rate setpoint"]
16113    pub yaw_rate: f32,
16114    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
16115    pub type_mask: PositionTargetTypemask,
16116    #[doc = "System ID"]
16117    pub target_system: u8,
16118    #[doc = "Component ID"]
16119    pub target_component: u8,
16120    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
16121    pub coordinate_frame: MavFrame,
16122}
16123impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
16124    pub const ENCODED_LEN: usize = 53usize;
16125    pub const DEFAULT: Self = Self {
16126        time_boot_ms: 0_u32,
16127        lat_int: 0_i32,
16128        lon_int: 0_i32,
16129        alt: 0.0_f32,
16130        vx: 0.0_f32,
16131        vy: 0.0_f32,
16132        vz: 0.0_f32,
16133        afx: 0.0_f32,
16134        afy: 0.0_f32,
16135        afz: 0.0_f32,
16136        yaw: 0.0_f32,
16137        yaw_rate: 0.0_f32,
16138        type_mask: PositionTargetTypemask::DEFAULT,
16139        target_system: 0_u8,
16140        target_component: 0_u8,
16141        coordinate_frame: MavFrame::DEFAULT,
16142    };
16143    #[cfg(feature = "arbitrary")]
16144    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16145        use arbitrary::{Arbitrary, Unstructured};
16146        let mut buf = [0u8; 1024];
16147        rng.fill_bytes(&mut buf);
16148        let mut unstructured = Unstructured::new(&buf);
16149        Self::arbitrary(&mut unstructured).unwrap_or_default()
16150    }
16151}
16152impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
16153    fn default() -> Self {
16154        Self::DEFAULT.clone()
16155    }
16156}
16157impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
16158    type Message = MavMessage;
16159    const ID: u32 = 86u32;
16160    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
16161    const EXTRA_CRC: u8 = 5u8;
16162    const ENCODED_LEN: usize = 53usize;
16163    fn deser(
16164        _version: MavlinkVersion,
16165        __input: &[u8],
16166    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16167        let avail_len = __input.len();
16168        let mut payload_buf = [0; Self::ENCODED_LEN];
16169        let mut buf = if avail_len < Self::ENCODED_LEN {
16170            payload_buf[0..avail_len].copy_from_slice(__input);
16171            Bytes::new(&payload_buf)
16172        } else {
16173            Bytes::new(__input)
16174        };
16175        let mut __struct = Self::default();
16176        __struct.time_boot_ms = buf.get_u32_le();
16177        __struct.lat_int = buf.get_i32_le();
16178        __struct.lon_int = buf.get_i32_le();
16179        __struct.alt = buf.get_f32_le();
16180        __struct.vx = buf.get_f32_le();
16181        __struct.vy = buf.get_f32_le();
16182        __struct.vz = buf.get_f32_le();
16183        __struct.afx = buf.get_f32_le();
16184        __struct.afy = buf.get_f32_le();
16185        __struct.afz = buf.get_f32_le();
16186        __struct.yaw = buf.get_f32_le();
16187        __struct.yaw_rate = buf.get_f32_le();
16188        let tmp = buf.get_u16_le();
16189        __struct.type_mask = PositionTargetTypemask::from_bits(
16190            tmp & PositionTargetTypemask::all().bits(),
16191        )
16192        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16193            flag_type: "PositionTargetTypemask",
16194            value: tmp as u32,
16195        })?;
16196        __struct.target_system = buf.get_u8();
16197        __struct.target_component = buf.get_u8();
16198        let tmp = buf.get_u8();
16199        __struct.coordinate_frame =
16200            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16201                enum_type: "MavFrame",
16202                value: tmp as u32,
16203            })?;
16204        Ok(__struct)
16205    }
16206    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16207        let mut __tmp = BytesMut::new(bytes);
16208        #[allow(clippy::absurd_extreme_comparisons)]
16209        #[allow(unused_comparisons)]
16210        if __tmp.remaining() < Self::ENCODED_LEN {
16211            panic!(
16212                "buffer is too small (need {} bytes, but got {})",
16213                Self::ENCODED_LEN,
16214                __tmp.remaining(),
16215            )
16216        }
16217        __tmp.put_u32_le(self.time_boot_ms);
16218        __tmp.put_i32_le(self.lat_int);
16219        __tmp.put_i32_le(self.lon_int);
16220        __tmp.put_f32_le(self.alt);
16221        __tmp.put_f32_le(self.vx);
16222        __tmp.put_f32_le(self.vy);
16223        __tmp.put_f32_le(self.vz);
16224        __tmp.put_f32_le(self.afx);
16225        __tmp.put_f32_le(self.afy);
16226        __tmp.put_f32_le(self.afz);
16227        __tmp.put_f32_le(self.yaw);
16228        __tmp.put_f32_le(self.yaw_rate);
16229        __tmp.put_u16_le(self.type_mask.bits());
16230        __tmp.put_u8(self.target_system);
16231        __tmp.put_u8(self.target_component);
16232        __tmp.put_u8(self.coordinate_frame as u8);
16233        if matches!(version, MavlinkVersion::V2) {
16234            let len = __tmp.len();
16235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16236        } else {
16237            __tmp.len()
16238        }
16239    }
16240}
16241#[doc = "id: 84"]
16242#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
16243#[derive(Debug, Clone, PartialEq)]
16244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16246pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
16247    #[doc = "Timestamp (time since system boot)."]
16248    pub time_boot_ms: u32,
16249    #[doc = "X Position in NED frame"]
16250    pub x: f32,
16251    #[doc = "Y Position in NED frame"]
16252    pub y: f32,
16253    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
16254    pub z: f32,
16255    #[doc = "X velocity in NED frame"]
16256    pub vx: f32,
16257    #[doc = "Y velocity in NED frame"]
16258    pub vy: f32,
16259    #[doc = "Z velocity in NED frame"]
16260    pub vz: f32,
16261    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
16262    pub afx: f32,
16263    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
16264    pub afy: f32,
16265    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
16266    pub afz: f32,
16267    #[doc = "yaw setpoint"]
16268    pub yaw: f32,
16269    #[doc = "yaw rate setpoint"]
16270    pub yaw_rate: f32,
16271    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
16272    pub type_mask: PositionTargetTypemask,
16273    #[doc = "System ID"]
16274    pub target_system: u8,
16275    #[doc = "Component ID"]
16276    pub target_component: u8,
16277    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
16278    pub coordinate_frame: MavFrame,
16279}
16280impl SET_POSITION_TARGET_LOCAL_NED_DATA {
16281    pub const ENCODED_LEN: usize = 53usize;
16282    pub const DEFAULT: Self = Self {
16283        time_boot_ms: 0_u32,
16284        x: 0.0_f32,
16285        y: 0.0_f32,
16286        z: 0.0_f32,
16287        vx: 0.0_f32,
16288        vy: 0.0_f32,
16289        vz: 0.0_f32,
16290        afx: 0.0_f32,
16291        afy: 0.0_f32,
16292        afz: 0.0_f32,
16293        yaw: 0.0_f32,
16294        yaw_rate: 0.0_f32,
16295        type_mask: PositionTargetTypemask::DEFAULT,
16296        target_system: 0_u8,
16297        target_component: 0_u8,
16298        coordinate_frame: MavFrame::DEFAULT,
16299    };
16300    #[cfg(feature = "arbitrary")]
16301    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16302        use arbitrary::{Arbitrary, Unstructured};
16303        let mut buf = [0u8; 1024];
16304        rng.fill_bytes(&mut buf);
16305        let mut unstructured = Unstructured::new(&buf);
16306        Self::arbitrary(&mut unstructured).unwrap_or_default()
16307    }
16308}
16309impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
16310    fn default() -> Self {
16311        Self::DEFAULT.clone()
16312    }
16313}
16314impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
16315    type Message = MavMessage;
16316    const ID: u32 = 84u32;
16317    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
16318    const EXTRA_CRC: u8 = 143u8;
16319    const ENCODED_LEN: usize = 53usize;
16320    fn deser(
16321        _version: MavlinkVersion,
16322        __input: &[u8],
16323    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16324        let avail_len = __input.len();
16325        let mut payload_buf = [0; Self::ENCODED_LEN];
16326        let mut buf = if avail_len < Self::ENCODED_LEN {
16327            payload_buf[0..avail_len].copy_from_slice(__input);
16328            Bytes::new(&payload_buf)
16329        } else {
16330            Bytes::new(__input)
16331        };
16332        let mut __struct = Self::default();
16333        __struct.time_boot_ms = buf.get_u32_le();
16334        __struct.x = buf.get_f32_le();
16335        __struct.y = buf.get_f32_le();
16336        __struct.z = buf.get_f32_le();
16337        __struct.vx = buf.get_f32_le();
16338        __struct.vy = buf.get_f32_le();
16339        __struct.vz = buf.get_f32_le();
16340        __struct.afx = buf.get_f32_le();
16341        __struct.afy = buf.get_f32_le();
16342        __struct.afz = buf.get_f32_le();
16343        __struct.yaw = buf.get_f32_le();
16344        __struct.yaw_rate = buf.get_f32_le();
16345        let tmp = buf.get_u16_le();
16346        __struct.type_mask = PositionTargetTypemask::from_bits(
16347            tmp & PositionTargetTypemask::all().bits(),
16348        )
16349        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16350            flag_type: "PositionTargetTypemask",
16351            value: tmp as u32,
16352        })?;
16353        __struct.target_system = buf.get_u8();
16354        __struct.target_component = buf.get_u8();
16355        let tmp = buf.get_u8();
16356        __struct.coordinate_frame =
16357            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16358                enum_type: "MavFrame",
16359                value: tmp as u32,
16360            })?;
16361        Ok(__struct)
16362    }
16363    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16364        let mut __tmp = BytesMut::new(bytes);
16365        #[allow(clippy::absurd_extreme_comparisons)]
16366        #[allow(unused_comparisons)]
16367        if __tmp.remaining() < Self::ENCODED_LEN {
16368            panic!(
16369                "buffer is too small (need {} bytes, but got {})",
16370                Self::ENCODED_LEN,
16371                __tmp.remaining(),
16372            )
16373        }
16374        __tmp.put_u32_le(self.time_boot_ms);
16375        __tmp.put_f32_le(self.x);
16376        __tmp.put_f32_le(self.y);
16377        __tmp.put_f32_le(self.z);
16378        __tmp.put_f32_le(self.vx);
16379        __tmp.put_f32_le(self.vy);
16380        __tmp.put_f32_le(self.vz);
16381        __tmp.put_f32_le(self.afx);
16382        __tmp.put_f32_le(self.afy);
16383        __tmp.put_f32_le(self.afz);
16384        __tmp.put_f32_le(self.yaw);
16385        __tmp.put_f32_le(self.yaw_rate);
16386        __tmp.put_u16_le(self.type_mask.bits());
16387        __tmp.put_u8(self.target_system);
16388        __tmp.put_u8(self.target_component);
16389        __tmp.put_u8(self.coordinate_frame as u8);
16390        if matches!(version, MavlinkVersion::V2) {
16391            let len = __tmp.len();
16392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16393        } else {
16394            __tmp.len()
16395        }
16396    }
16397}
16398#[doc = "id: 115"]
16399#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16400#[derive(Debug, Clone, PartialEq)]
16401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16402#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16403pub struct HIL_STATE_QUATERNION_DATA {
16404    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16405    pub time_usec: u64,
16406    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16407    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16408    pub attitude_quaternion: [f32; 4],
16409    #[doc = "Body frame roll / phi angular speed"]
16410    pub rollspeed: f32,
16411    #[doc = "Body frame pitch / theta angular speed"]
16412    pub pitchspeed: f32,
16413    #[doc = "Body frame yaw / psi angular speed"]
16414    pub yawspeed: f32,
16415    #[doc = "Latitude"]
16416    pub lat: i32,
16417    #[doc = "Longitude"]
16418    pub lon: i32,
16419    #[doc = "Altitude"]
16420    pub alt: i32,
16421    #[doc = "Ground X Speed (Latitude)"]
16422    pub vx: i16,
16423    #[doc = "Ground Y Speed (Longitude)"]
16424    pub vy: i16,
16425    #[doc = "Ground Z Speed (Altitude)"]
16426    pub vz: i16,
16427    #[doc = "Indicated airspeed"]
16428    pub ind_airspeed: u16,
16429    #[doc = "True airspeed"]
16430    pub true_airspeed: u16,
16431    #[doc = "X acceleration"]
16432    pub xacc: i16,
16433    #[doc = "Y acceleration"]
16434    pub yacc: i16,
16435    #[doc = "Z acceleration"]
16436    pub zacc: i16,
16437}
16438impl HIL_STATE_QUATERNION_DATA {
16439    pub const ENCODED_LEN: usize = 64usize;
16440    pub const DEFAULT: Self = Self {
16441        time_usec: 0_u64,
16442        attitude_quaternion: [0.0_f32; 4usize],
16443        rollspeed: 0.0_f32,
16444        pitchspeed: 0.0_f32,
16445        yawspeed: 0.0_f32,
16446        lat: 0_i32,
16447        lon: 0_i32,
16448        alt: 0_i32,
16449        vx: 0_i16,
16450        vy: 0_i16,
16451        vz: 0_i16,
16452        ind_airspeed: 0_u16,
16453        true_airspeed: 0_u16,
16454        xacc: 0_i16,
16455        yacc: 0_i16,
16456        zacc: 0_i16,
16457    };
16458    #[cfg(feature = "arbitrary")]
16459    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16460        use arbitrary::{Arbitrary, Unstructured};
16461        let mut buf = [0u8; 1024];
16462        rng.fill_bytes(&mut buf);
16463        let mut unstructured = Unstructured::new(&buf);
16464        Self::arbitrary(&mut unstructured).unwrap_or_default()
16465    }
16466}
16467impl Default for HIL_STATE_QUATERNION_DATA {
16468    fn default() -> Self {
16469        Self::DEFAULT.clone()
16470    }
16471}
16472impl MessageData for HIL_STATE_QUATERNION_DATA {
16473    type Message = MavMessage;
16474    const ID: u32 = 115u32;
16475    const NAME: &'static str = "HIL_STATE_QUATERNION";
16476    const EXTRA_CRC: u8 = 4u8;
16477    const ENCODED_LEN: usize = 64usize;
16478    fn deser(
16479        _version: MavlinkVersion,
16480        __input: &[u8],
16481    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16482        let avail_len = __input.len();
16483        let mut payload_buf = [0; Self::ENCODED_LEN];
16484        let mut buf = if avail_len < Self::ENCODED_LEN {
16485            payload_buf[0..avail_len].copy_from_slice(__input);
16486            Bytes::new(&payload_buf)
16487        } else {
16488            Bytes::new(__input)
16489        };
16490        let mut __struct = Self::default();
16491        __struct.time_usec = buf.get_u64_le();
16492        for v in &mut __struct.attitude_quaternion {
16493            let val = buf.get_f32_le();
16494            *v = val;
16495        }
16496        __struct.rollspeed = buf.get_f32_le();
16497        __struct.pitchspeed = buf.get_f32_le();
16498        __struct.yawspeed = buf.get_f32_le();
16499        __struct.lat = buf.get_i32_le();
16500        __struct.lon = buf.get_i32_le();
16501        __struct.alt = buf.get_i32_le();
16502        __struct.vx = buf.get_i16_le();
16503        __struct.vy = buf.get_i16_le();
16504        __struct.vz = buf.get_i16_le();
16505        __struct.ind_airspeed = buf.get_u16_le();
16506        __struct.true_airspeed = buf.get_u16_le();
16507        __struct.xacc = buf.get_i16_le();
16508        __struct.yacc = buf.get_i16_le();
16509        __struct.zacc = buf.get_i16_le();
16510        Ok(__struct)
16511    }
16512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16513        let mut __tmp = BytesMut::new(bytes);
16514        #[allow(clippy::absurd_extreme_comparisons)]
16515        #[allow(unused_comparisons)]
16516        if __tmp.remaining() < Self::ENCODED_LEN {
16517            panic!(
16518                "buffer is too small (need {} bytes, but got {})",
16519                Self::ENCODED_LEN,
16520                __tmp.remaining(),
16521            )
16522        }
16523        __tmp.put_u64_le(self.time_usec);
16524        for val in &self.attitude_quaternion {
16525            __tmp.put_f32_le(*val);
16526        }
16527        __tmp.put_f32_le(self.rollspeed);
16528        __tmp.put_f32_le(self.pitchspeed);
16529        __tmp.put_f32_le(self.yawspeed);
16530        __tmp.put_i32_le(self.lat);
16531        __tmp.put_i32_le(self.lon);
16532        __tmp.put_i32_le(self.alt);
16533        __tmp.put_i16_le(self.vx);
16534        __tmp.put_i16_le(self.vy);
16535        __tmp.put_i16_le(self.vz);
16536        __tmp.put_u16_le(self.ind_airspeed);
16537        __tmp.put_u16_le(self.true_airspeed);
16538        __tmp.put_i16_le(self.xacc);
16539        __tmp.put_i16_le(self.yacc);
16540        __tmp.put_i16_le(self.zacc);
16541        if matches!(version, MavlinkVersion::V2) {
16542            let len = __tmp.len();
16543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16544        } else {
16545            __tmp.len()
16546        }
16547    }
16548}
16549#[doc = "id: 134"]
16550#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
16551#[derive(Debug, Clone, PartialEq)]
16552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16553#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16554pub struct TERRAIN_DATA_DATA {
16555    #[doc = "Latitude of SW corner of first grid"]
16556    pub lat: i32,
16557    #[doc = "Longitude of SW corner of first grid"]
16558    pub lon: i32,
16559    #[doc = "Grid spacing"]
16560    pub grid_spacing: u16,
16561    #[doc = "Terrain data MSL"]
16562    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16563    pub data: [i16; 16],
16564    #[doc = "bit within the terrain request mask"]
16565    pub gridbit: u8,
16566}
16567impl TERRAIN_DATA_DATA {
16568    pub const ENCODED_LEN: usize = 43usize;
16569    pub const DEFAULT: Self = Self {
16570        lat: 0_i32,
16571        lon: 0_i32,
16572        grid_spacing: 0_u16,
16573        data: [0_i16; 16usize],
16574        gridbit: 0_u8,
16575    };
16576    #[cfg(feature = "arbitrary")]
16577    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16578        use arbitrary::{Arbitrary, Unstructured};
16579        let mut buf = [0u8; 1024];
16580        rng.fill_bytes(&mut buf);
16581        let mut unstructured = Unstructured::new(&buf);
16582        Self::arbitrary(&mut unstructured).unwrap_or_default()
16583    }
16584}
16585impl Default for TERRAIN_DATA_DATA {
16586    fn default() -> Self {
16587        Self::DEFAULT.clone()
16588    }
16589}
16590impl MessageData for TERRAIN_DATA_DATA {
16591    type Message = MavMessage;
16592    const ID: u32 = 134u32;
16593    const NAME: &'static str = "TERRAIN_DATA";
16594    const EXTRA_CRC: u8 = 229u8;
16595    const ENCODED_LEN: usize = 43usize;
16596    fn deser(
16597        _version: MavlinkVersion,
16598        __input: &[u8],
16599    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16600        let avail_len = __input.len();
16601        let mut payload_buf = [0; Self::ENCODED_LEN];
16602        let mut buf = if avail_len < Self::ENCODED_LEN {
16603            payload_buf[0..avail_len].copy_from_slice(__input);
16604            Bytes::new(&payload_buf)
16605        } else {
16606            Bytes::new(__input)
16607        };
16608        let mut __struct = Self::default();
16609        __struct.lat = buf.get_i32_le();
16610        __struct.lon = buf.get_i32_le();
16611        __struct.grid_spacing = buf.get_u16_le();
16612        for v in &mut __struct.data {
16613            let val = buf.get_i16_le();
16614            *v = val;
16615        }
16616        __struct.gridbit = buf.get_u8();
16617        Ok(__struct)
16618    }
16619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16620        let mut __tmp = BytesMut::new(bytes);
16621        #[allow(clippy::absurd_extreme_comparisons)]
16622        #[allow(unused_comparisons)]
16623        if __tmp.remaining() < Self::ENCODED_LEN {
16624            panic!(
16625                "buffer is too small (need {} bytes, but got {})",
16626                Self::ENCODED_LEN,
16627                __tmp.remaining(),
16628            )
16629        }
16630        __tmp.put_i32_le(self.lat);
16631        __tmp.put_i32_le(self.lon);
16632        __tmp.put_u16_le(self.grid_spacing);
16633        for val in &self.data {
16634            __tmp.put_i16_le(*val);
16635        }
16636        __tmp.put_u8(self.gridbit);
16637        if matches!(version, MavlinkVersion::V2) {
16638            let len = __tmp.len();
16639            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16640        } else {
16641            __tmp.len()
16642        }
16643    }
16644}
16645#[doc = "id: 401"]
16646#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
16647#[derive(Debug, Clone, PartialEq)]
16648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16650pub struct SUPPORTED_TUNES_DATA {
16651    #[doc = "Bitfield of supported tune formats."]
16652    pub format: TuneFormat,
16653    #[doc = "System ID"]
16654    pub target_system: u8,
16655    #[doc = "Component ID"]
16656    pub target_component: u8,
16657}
16658impl SUPPORTED_TUNES_DATA {
16659    pub const ENCODED_LEN: usize = 6usize;
16660    pub const DEFAULT: Self = Self {
16661        format: TuneFormat::DEFAULT,
16662        target_system: 0_u8,
16663        target_component: 0_u8,
16664    };
16665    #[cfg(feature = "arbitrary")]
16666    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16667        use arbitrary::{Arbitrary, Unstructured};
16668        let mut buf = [0u8; 1024];
16669        rng.fill_bytes(&mut buf);
16670        let mut unstructured = Unstructured::new(&buf);
16671        Self::arbitrary(&mut unstructured).unwrap_or_default()
16672    }
16673}
16674impl Default for SUPPORTED_TUNES_DATA {
16675    fn default() -> Self {
16676        Self::DEFAULT.clone()
16677    }
16678}
16679impl MessageData for SUPPORTED_TUNES_DATA {
16680    type Message = MavMessage;
16681    const ID: u32 = 401u32;
16682    const NAME: &'static str = "SUPPORTED_TUNES";
16683    const EXTRA_CRC: u8 = 183u8;
16684    const ENCODED_LEN: usize = 6usize;
16685    fn deser(
16686        _version: MavlinkVersion,
16687        __input: &[u8],
16688    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16689        let avail_len = __input.len();
16690        let mut payload_buf = [0; Self::ENCODED_LEN];
16691        let mut buf = if avail_len < Self::ENCODED_LEN {
16692            payload_buf[0..avail_len].copy_from_slice(__input);
16693            Bytes::new(&payload_buf)
16694        } else {
16695            Bytes::new(__input)
16696        };
16697        let mut __struct = Self::default();
16698        let tmp = buf.get_u32_le();
16699        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
16700            ::mavlink_core::error::ParserError::InvalidEnum {
16701                enum_type: "TuneFormat",
16702                value: tmp as u32,
16703            },
16704        )?;
16705        __struct.target_system = buf.get_u8();
16706        __struct.target_component = buf.get_u8();
16707        Ok(__struct)
16708    }
16709    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16710        let mut __tmp = BytesMut::new(bytes);
16711        #[allow(clippy::absurd_extreme_comparisons)]
16712        #[allow(unused_comparisons)]
16713        if __tmp.remaining() < Self::ENCODED_LEN {
16714            panic!(
16715                "buffer is too small (need {} bytes, but got {})",
16716                Self::ENCODED_LEN,
16717                __tmp.remaining(),
16718            )
16719        }
16720        __tmp.put_u32_le(self.format as u32);
16721        __tmp.put_u8(self.target_system);
16722        __tmp.put_u8(self.target_component);
16723        if matches!(version, MavlinkVersion::V2) {
16724            let len = __tmp.len();
16725            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16726        } else {
16727            __tmp.len()
16728        }
16729    }
16730}
16731#[doc = "id: 131"]
16732#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
16733#[derive(Debug, Clone, PartialEq)]
16734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16736pub struct ENCAPSULATED_DATA_DATA {
16737    #[doc = "sequence number (starting with 0 on every transmission)"]
16738    pub seqnr: u16,
16739    #[doc = "image data bytes"]
16740    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16741    pub data: [u8; 253],
16742}
16743impl ENCAPSULATED_DATA_DATA {
16744    pub const ENCODED_LEN: usize = 255usize;
16745    pub const DEFAULT: Self = Self {
16746        seqnr: 0_u16,
16747        data: [0_u8; 253usize],
16748    };
16749    #[cfg(feature = "arbitrary")]
16750    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16751        use arbitrary::{Arbitrary, Unstructured};
16752        let mut buf = [0u8; 1024];
16753        rng.fill_bytes(&mut buf);
16754        let mut unstructured = Unstructured::new(&buf);
16755        Self::arbitrary(&mut unstructured).unwrap_or_default()
16756    }
16757}
16758impl Default for ENCAPSULATED_DATA_DATA {
16759    fn default() -> Self {
16760        Self::DEFAULT.clone()
16761    }
16762}
16763impl MessageData for ENCAPSULATED_DATA_DATA {
16764    type Message = MavMessage;
16765    const ID: u32 = 131u32;
16766    const NAME: &'static str = "ENCAPSULATED_DATA";
16767    const EXTRA_CRC: u8 = 223u8;
16768    const ENCODED_LEN: usize = 255usize;
16769    fn deser(
16770        _version: MavlinkVersion,
16771        __input: &[u8],
16772    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16773        let avail_len = __input.len();
16774        let mut payload_buf = [0; Self::ENCODED_LEN];
16775        let mut buf = if avail_len < Self::ENCODED_LEN {
16776            payload_buf[0..avail_len].copy_from_slice(__input);
16777            Bytes::new(&payload_buf)
16778        } else {
16779            Bytes::new(__input)
16780        };
16781        let mut __struct = Self::default();
16782        __struct.seqnr = buf.get_u16_le();
16783        for v in &mut __struct.data {
16784            let val = buf.get_u8();
16785            *v = val;
16786        }
16787        Ok(__struct)
16788    }
16789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16790        let mut __tmp = BytesMut::new(bytes);
16791        #[allow(clippy::absurd_extreme_comparisons)]
16792        #[allow(unused_comparisons)]
16793        if __tmp.remaining() < Self::ENCODED_LEN {
16794            panic!(
16795                "buffer is too small (need {} bytes, but got {})",
16796                Self::ENCODED_LEN,
16797                __tmp.remaining(),
16798            )
16799        }
16800        __tmp.put_u16_le(self.seqnr);
16801        for val in &self.data {
16802            __tmp.put_u8(*val);
16803        }
16804        if matches!(version, MavlinkVersion::V2) {
16805            let len = __tmp.len();
16806            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16807        } else {
16808            __tmp.len()
16809        }
16810    }
16811}
16812#[doc = "id: 132"]
16813#[doc = "Distance sensor information for an onboard rangefinder."]
16814#[derive(Debug, Clone, PartialEq)]
16815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16817pub struct DISTANCE_SENSOR_DATA {
16818    #[doc = "Timestamp (time since system boot)."]
16819    pub time_boot_ms: u32,
16820    #[doc = "Minimum distance the sensor can measure"]
16821    pub min_distance: u16,
16822    #[doc = "Maximum distance the sensor can measure"]
16823    pub max_distance: u16,
16824    #[doc = "Current distance reading"]
16825    pub current_distance: u16,
16826    #[doc = "Type of distance sensor."]
16827    pub mavtype: MavDistanceSensor,
16828    #[doc = "Onboard ID of the sensor"]
16829    pub id: u8,
16830    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
16831    pub orientation: MavSensorOrientation,
16832    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
16833    pub covariance: u8,
16834    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
16835    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16836    pub horizontal_fov: f32,
16837    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
16838    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16839    pub vertical_fov: f32,
16840    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
16841    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16842    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16843    pub quaternion: [f32; 4],
16844    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
16845    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16846    pub signal_quality: u8,
16847}
16848impl DISTANCE_SENSOR_DATA {
16849    pub const ENCODED_LEN: usize = 39usize;
16850    pub const DEFAULT: Self = Self {
16851        time_boot_ms: 0_u32,
16852        min_distance: 0_u16,
16853        max_distance: 0_u16,
16854        current_distance: 0_u16,
16855        mavtype: MavDistanceSensor::DEFAULT,
16856        id: 0_u8,
16857        orientation: MavSensorOrientation::DEFAULT,
16858        covariance: 0_u8,
16859        horizontal_fov: 0.0_f32,
16860        vertical_fov: 0.0_f32,
16861        quaternion: [0.0_f32; 4usize],
16862        signal_quality: 0_u8,
16863    };
16864    #[cfg(feature = "arbitrary")]
16865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16866        use arbitrary::{Arbitrary, Unstructured};
16867        let mut buf = [0u8; 1024];
16868        rng.fill_bytes(&mut buf);
16869        let mut unstructured = Unstructured::new(&buf);
16870        Self::arbitrary(&mut unstructured).unwrap_or_default()
16871    }
16872}
16873impl Default for DISTANCE_SENSOR_DATA {
16874    fn default() -> Self {
16875        Self::DEFAULT.clone()
16876    }
16877}
16878impl MessageData for DISTANCE_SENSOR_DATA {
16879    type Message = MavMessage;
16880    const ID: u32 = 132u32;
16881    const NAME: &'static str = "DISTANCE_SENSOR";
16882    const EXTRA_CRC: u8 = 85u8;
16883    const ENCODED_LEN: usize = 39usize;
16884    fn deser(
16885        _version: MavlinkVersion,
16886        __input: &[u8],
16887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16888        let avail_len = __input.len();
16889        let mut payload_buf = [0; Self::ENCODED_LEN];
16890        let mut buf = if avail_len < Self::ENCODED_LEN {
16891            payload_buf[0..avail_len].copy_from_slice(__input);
16892            Bytes::new(&payload_buf)
16893        } else {
16894            Bytes::new(__input)
16895        };
16896        let mut __struct = Self::default();
16897        __struct.time_boot_ms = buf.get_u32_le();
16898        __struct.min_distance = buf.get_u16_le();
16899        __struct.max_distance = buf.get_u16_le();
16900        __struct.current_distance = buf.get_u16_le();
16901        let tmp = buf.get_u8();
16902        __struct.mavtype =
16903            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16904                enum_type: "MavDistanceSensor",
16905                value: tmp as u32,
16906            })?;
16907        __struct.id = buf.get_u8();
16908        let tmp = buf.get_u8();
16909        __struct.orientation =
16910            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16911                enum_type: "MavSensorOrientation",
16912                value: tmp as u32,
16913            })?;
16914        __struct.covariance = buf.get_u8();
16915        __struct.horizontal_fov = buf.get_f32_le();
16916        __struct.vertical_fov = buf.get_f32_le();
16917        for v in &mut __struct.quaternion {
16918            let val = buf.get_f32_le();
16919            *v = val;
16920        }
16921        __struct.signal_quality = buf.get_u8();
16922        Ok(__struct)
16923    }
16924    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16925        let mut __tmp = BytesMut::new(bytes);
16926        #[allow(clippy::absurd_extreme_comparisons)]
16927        #[allow(unused_comparisons)]
16928        if __tmp.remaining() < Self::ENCODED_LEN {
16929            panic!(
16930                "buffer is too small (need {} bytes, but got {})",
16931                Self::ENCODED_LEN,
16932                __tmp.remaining(),
16933            )
16934        }
16935        __tmp.put_u32_le(self.time_boot_ms);
16936        __tmp.put_u16_le(self.min_distance);
16937        __tmp.put_u16_le(self.max_distance);
16938        __tmp.put_u16_le(self.current_distance);
16939        __tmp.put_u8(self.mavtype as u8);
16940        __tmp.put_u8(self.id);
16941        __tmp.put_u8(self.orientation as u8);
16942        __tmp.put_u8(self.covariance);
16943        __tmp.put_f32_le(self.horizontal_fov);
16944        __tmp.put_f32_le(self.vertical_fov);
16945        for val in &self.quaternion {
16946            __tmp.put_f32_le(*val);
16947        }
16948        __tmp.put_u8(self.signal_quality);
16949        if matches!(version, MavlinkVersion::V2) {
16950            let len = __tmp.len();
16951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16952        } else {
16953            __tmp.len()
16954        }
16955    }
16956}
16957#[doc = "id: 148"]
16958#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
16959#[derive(Debug, Clone, PartialEq)]
16960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16962pub struct AUTOPILOT_VERSION_DATA {
16963    #[doc = "Bitmap of capabilities"]
16964    pub capabilities: MavProtocolCapability,
16965    #[doc = "UID if provided by hardware (see uid2)"]
16966    pub uid: u64,
16967    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
16968    pub flight_sw_version: u32,
16969    #[doc = "Middleware version number"]
16970    pub middleware_sw_version: u32,
16971    #[doc = "Operating system version number"]
16972    pub os_sw_version: u32,
16973    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
16974    pub board_version: u32,
16975    #[doc = "ID of the board vendor"]
16976    pub vendor_id: u16,
16977    #[doc = "ID of the product"]
16978    pub product_id: u16,
16979    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
16980    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16981    pub flight_custom_version: [u8; 8],
16982    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
16983    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16984    pub middleware_custom_version: [u8; 8],
16985    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
16986    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16987    pub os_custom_version: [u8; 8],
16988    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
16989    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16990    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16991    pub uid2: [u8; 18],
16992}
16993impl AUTOPILOT_VERSION_DATA {
16994    pub const ENCODED_LEN: usize = 78usize;
16995    pub const DEFAULT: Self = Self {
16996        capabilities: MavProtocolCapability::DEFAULT,
16997        uid: 0_u64,
16998        flight_sw_version: 0_u32,
16999        middleware_sw_version: 0_u32,
17000        os_sw_version: 0_u32,
17001        board_version: 0_u32,
17002        vendor_id: 0_u16,
17003        product_id: 0_u16,
17004        flight_custom_version: [0_u8; 8usize],
17005        middleware_custom_version: [0_u8; 8usize],
17006        os_custom_version: [0_u8; 8usize],
17007        uid2: [0_u8; 18usize],
17008    };
17009    #[cfg(feature = "arbitrary")]
17010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17011        use arbitrary::{Arbitrary, Unstructured};
17012        let mut buf = [0u8; 1024];
17013        rng.fill_bytes(&mut buf);
17014        let mut unstructured = Unstructured::new(&buf);
17015        Self::arbitrary(&mut unstructured).unwrap_or_default()
17016    }
17017}
17018impl Default for AUTOPILOT_VERSION_DATA {
17019    fn default() -> Self {
17020        Self::DEFAULT.clone()
17021    }
17022}
17023impl MessageData for AUTOPILOT_VERSION_DATA {
17024    type Message = MavMessage;
17025    const ID: u32 = 148u32;
17026    const NAME: &'static str = "AUTOPILOT_VERSION";
17027    const EXTRA_CRC: u8 = 178u8;
17028    const ENCODED_LEN: usize = 78usize;
17029    fn deser(
17030        _version: MavlinkVersion,
17031        __input: &[u8],
17032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17033        let avail_len = __input.len();
17034        let mut payload_buf = [0; Self::ENCODED_LEN];
17035        let mut buf = if avail_len < Self::ENCODED_LEN {
17036            payload_buf[0..avail_len].copy_from_slice(__input);
17037            Bytes::new(&payload_buf)
17038        } else {
17039            Bytes::new(__input)
17040        };
17041        let mut __struct = Self::default();
17042        let tmp = buf.get_u64_le();
17043        __struct.capabilities = MavProtocolCapability::from_bits(
17044            tmp & MavProtocolCapability::all().bits(),
17045        )
17046        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17047            flag_type: "MavProtocolCapability",
17048            value: tmp as u32,
17049        })?;
17050        __struct.uid = buf.get_u64_le();
17051        __struct.flight_sw_version = buf.get_u32_le();
17052        __struct.middleware_sw_version = buf.get_u32_le();
17053        __struct.os_sw_version = buf.get_u32_le();
17054        __struct.board_version = buf.get_u32_le();
17055        __struct.vendor_id = buf.get_u16_le();
17056        __struct.product_id = buf.get_u16_le();
17057        for v in &mut __struct.flight_custom_version {
17058            let val = buf.get_u8();
17059            *v = val;
17060        }
17061        for v in &mut __struct.middleware_custom_version {
17062            let val = buf.get_u8();
17063            *v = val;
17064        }
17065        for v in &mut __struct.os_custom_version {
17066            let val = buf.get_u8();
17067            *v = val;
17068        }
17069        for v in &mut __struct.uid2 {
17070            let val = buf.get_u8();
17071            *v = val;
17072        }
17073        Ok(__struct)
17074    }
17075    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17076        let mut __tmp = BytesMut::new(bytes);
17077        #[allow(clippy::absurd_extreme_comparisons)]
17078        #[allow(unused_comparisons)]
17079        if __tmp.remaining() < Self::ENCODED_LEN {
17080            panic!(
17081                "buffer is too small (need {} bytes, but got {})",
17082                Self::ENCODED_LEN,
17083                __tmp.remaining(),
17084            )
17085        }
17086        __tmp.put_u64_le(self.capabilities.bits());
17087        __tmp.put_u64_le(self.uid);
17088        __tmp.put_u32_le(self.flight_sw_version);
17089        __tmp.put_u32_le(self.middleware_sw_version);
17090        __tmp.put_u32_le(self.os_sw_version);
17091        __tmp.put_u32_le(self.board_version);
17092        __tmp.put_u16_le(self.vendor_id);
17093        __tmp.put_u16_le(self.product_id);
17094        for val in &self.flight_custom_version {
17095            __tmp.put_u8(*val);
17096        }
17097        for val in &self.middleware_custom_version {
17098            __tmp.put_u8(*val);
17099        }
17100        for val in &self.os_custom_version {
17101            __tmp.put_u8(*val);
17102        }
17103        for val in &self.uid2 {
17104            __tmp.put_u8(*val);
17105        }
17106        if matches!(version, MavlinkVersion::V2) {
17107            let len = __tmp.len();
17108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17109        } else {
17110            __tmp.len()
17111        }
17112    }
17113}
17114#[doc = "id: 39"]
17115#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
17116#[derive(Debug, Clone, PartialEq)]
17117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17119pub struct MISSION_ITEM_DATA {
17120    #[doc = "PARAM1, see MAV_CMD enum"]
17121    pub param1: f32,
17122    #[doc = "PARAM2, see MAV_CMD enum"]
17123    pub param2: f32,
17124    #[doc = "PARAM3, see MAV_CMD enum"]
17125    pub param3: f32,
17126    #[doc = "PARAM4, see MAV_CMD enum"]
17127    pub param4: f32,
17128    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
17129    pub x: f32,
17130    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
17131    pub y: f32,
17132    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
17133    pub z: f32,
17134    #[doc = "Sequence"]
17135    pub seq: u16,
17136    #[doc = "The scheduled action for the waypoint."]
17137    pub command: MavCmd,
17138    #[doc = "System ID"]
17139    pub target_system: u8,
17140    #[doc = "Component ID"]
17141    pub target_component: u8,
17142    #[doc = "The coordinate system of the waypoint."]
17143    pub frame: MavFrame,
17144    #[doc = "false:0, true:1"]
17145    pub current: u8,
17146    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
17147    pub autocontinue: u8,
17148    #[doc = "Mission type."]
17149    #[cfg_attr(feature = "serde", serde(default))]
17150    pub mission_type: MavMissionType,
17151}
17152impl MISSION_ITEM_DATA {
17153    pub const ENCODED_LEN: usize = 38usize;
17154    pub const DEFAULT: Self = Self {
17155        param1: 0.0_f32,
17156        param2: 0.0_f32,
17157        param3: 0.0_f32,
17158        param4: 0.0_f32,
17159        x: 0.0_f32,
17160        y: 0.0_f32,
17161        z: 0.0_f32,
17162        seq: 0_u16,
17163        command: MavCmd::DEFAULT,
17164        target_system: 0_u8,
17165        target_component: 0_u8,
17166        frame: MavFrame::DEFAULT,
17167        current: 0_u8,
17168        autocontinue: 0_u8,
17169        mission_type: MavMissionType::DEFAULT,
17170    };
17171    #[cfg(feature = "arbitrary")]
17172    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17173        use arbitrary::{Arbitrary, Unstructured};
17174        let mut buf = [0u8; 1024];
17175        rng.fill_bytes(&mut buf);
17176        let mut unstructured = Unstructured::new(&buf);
17177        Self::arbitrary(&mut unstructured).unwrap_or_default()
17178    }
17179}
17180impl Default for MISSION_ITEM_DATA {
17181    fn default() -> Self {
17182        Self::DEFAULT.clone()
17183    }
17184}
17185impl MessageData for MISSION_ITEM_DATA {
17186    type Message = MavMessage;
17187    const ID: u32 = 39u32;
17188    const NAME: &'static str = "MISSION_ITEM";
17189    const EXTRA_CRC: u8 = 254u8;
17190    const ENCODED_LEN: usize = 38usize;
17191    fn deser(
17192        _version: MavlinkVersion,
17193        __input: &[u8],
17194    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17195        let avail_len = __input.len();
17196        let mut payload_buf = [0; Self::ENCODED_LEN];
17197        let mut buf = if avail_len < Self::ENCODED_LEN {
17198            payload_buf[0..avail_len].copy_from_slice(__input);
17199            Bytes::new(&payload_buf)
17200        } else {
17201            Bytes::new(__input)
17202        };
17203        let mut __struct = Self::default();
17204        __struct.param1 = buf.get_f32_le();
17205        __struct.param2 = buf.get_f32_le();
17206        __struct.param3 = buf.get_f32_le();
17207        __struct.param4 = buf.get_f32_le();
17208        __struct.x = buf.get_f32_le();
17209        __struct.y = buf.get_f32_le();
17210        __struct.z = buf.get_f32_le();
17211        __struct.seq = buf.get_u16_le();
17212        let tmp = buf.get_u16_le();
17213        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
17214            ::mavlink_core::error::ParserError::InvalidEnum {
17215                enum_type: "MavCmd",
17216                value: tmp as u32,
17217            },
17218        )?;
17219        __struct.target_system = buf.get_u8();
17220        __struct.target_component = buf.get_u8();
17221        let tmp = buf.get_u8();
17222        __struct.frame =
17223            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17224                enum_type: "MavFrame",
17225                value: tmp as u32,
17226            })?;
17227        __struct.current = buf.get_u8();
17228        __struct.autocontinue = buf.get_u8();
17229        let tmp = buf.get_u8();
17230        __struct.mission_type =
17231            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17232                enum_type: "MavMissionType",
17233                value: tmp as u32,
17234            })?;
17235        Ok(__struct)
17236    }
17237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17238        let mut __tmp = BytesMut::new(bytes);
17239        #[allow(clippy::absurd_extreme_comparisons)]
17240        #[allow(unused_comparisons)]
17241        if __tmp.remaining() < Self::ENCODED_LEN {
17242            panic!(
17243                "buffer is too small (need {} bytes, but got {})",
17244                Self::ENCODED_LEN,
17245                __tmp.remaining(),
17246            )
17247        }
17248        __tmp.put_f32_le(self.param1);
17249        __tmp.put_f32_le(self.param2);
17250        __tmp.put_f32_le(self.param3);
17251        __tmp.put_f32_le(self.param4);
17252        __tmp.put_f32_le(self.x);
17253        __tmp.put_f32_le(self.y);
17254        __tmp.put_f32_le(self.z);
17255        __tmp.put_u16_le(self.seq);
17256        __tmp.put_u16_le(self.command as u16);
17257        __tmp.put_u8(self.target_system);
17258        __tmp.put_u8(self.target_component);
17259        __tmp.put_u8(self.frame as u8);
17260        __tmp.put_u8(self.current);
17261        __tmp.put_u8(self.autocontinue);
17262        __tmp.put_u8(self.mission_type as u8);
17263        if matches!(version, MavlinkVersion::V2) {
17264            let len = __tmp.len();
17265            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17266        } else {
17267            __tmp.len()
17268        }
17269    }
17270}
17271#[doc = "id: 436"]
17272#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
17273#[derive(Debug, Clone, PartialEq)]
17274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17276pub struct CURRENT_MODE_DATA {
17277    #[doc = "A bitfield for use for autopilot-specific flags"]
17278    pub custom_mode: u32,
17279    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
17280    pub intended_custom_mode: u32,
17281    #[doc = "Standard mode."]
17282    pub standard_mode: MavStandardMode,
17283}
17284impl CURRENT_MODE_DATA {
17285    pub const ENCODED_LEN: usize = 9usize;
17286    pub const DEFAULT: Self = Self {
17287        custom_mode: 0_u32,
17288        intended_custom_mode: 0_u32,
17289        standard_mode: MavStandardMode::DEFAULT,
17290    };
17291    #[cfg(feature = "arbitrary")]
17292    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17293        use arbitrary::{Arbitrary, Unstructured};
17294        let mut buf = [0u8; 1024];
17295        rng.fill_bytes(&mut buf);
17296        let mut unstructured = Unstructured::new(&buf);
17297        Self::arbitrary(&mut unstructured).unwrap_or_default()
17298    }
17299}
17300impl Default for CURRENT_MODE_DATA {
17301    fn default() -> Self {
17302        Self::DEFAULT.clone()
17303    }
17304}
17305impl MessageData for CURRENT_MODE_DATA {
17306    type Message = MavMessage;
17307    const ID: u32 = 436u32;
17308    const NAME: &'static str = "CURRENT_MODE";
17309    const EXTRA_CRC: u8 = 193u8;
17310    const ENCODED_LEN: usize = 9usize;
17311    fn deser(
17312        _version: MavlinkVersion,
17313        __input: &[u8],
17314    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17315        let avail_len = __input.len();
17316        let mut payload_buf = [0; Self::ENCODED_LEN];
17317        let mut buf = if avail_len < Self::ENCODED_LEN {
17318            payload_buf[0..avail_len].copy_from_slice(__input);
17319            Bytes::new(&payload_buf)
17320        } else {
17321            Bytes::new(__input)
17322        };
17323        let mut __struct = Self::default();
17324        __struct.custom_mode = buf.get_u32_le();
17325        __struct.intended_custom_mode = buf.get_u32_le();
17326        let tmp = buf.get_u8();
17327        __struct.standard_mode =
17328            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17329                enum_type: "MavStandardMode",
17330                value: tmp as u32,
17331            })?;
17332        Ok(__struct)
17333    }
17334    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17335        let mut __tmp = BytesMut::new(bytes);
17336        #[allow(clippy::absurd_extreme_comparisons)]
17337        #[allow(unused_comparisons)]
17338        if __tmp.remaining() < Self::ENCODED_LEN {
17339            panic!(
17340                "buffer is too small (need {} bytes, but got {})",
17341                Self::ENCODED_LEN,
17342                __tmp.remaining(),
17343            )
17344        }
17345        __tmp.put_u32_le(self.custom_mode);
17346        __tmp.put_u32_le(self.intended_custom_mode);
17347        __tmp.put_u8(self.standard_mode as u8);
17348        if matches!(version, MavlinkVersion::V2) {
17349            let len = __tmp.len();
17350            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17351        } else {
17352            __tmp.len()
17353        }
17354    }
17355}
17356#[doc = "id: 48"]
17357#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
17358#[derive(Debug, Clone, PartialEq)]
17359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17361pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
17362    #[doc = "Latitude (WGS84)"]
17363    pub latitude: i32,
17364    #[doc = "Longitude (WGS84)"]
17365    pub longitude: i32,
17366    #[doc = "Altitude (MSL). Positive for up."]
17367    pub altitude: i32,
17368    #[doc = "System ID"]
17369    pub target_system: u8,
17370    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17371    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17372    pub time_usec: u64,
17373}
17374impl SET_GPS_GLOBAL_ORIGIN_DATA {
17375    pub const ENCODED_LEN: usize = 21usize;
17376    pub const DEFAULT: Self = Self {
17377        latitude: 0_i32,
17378        longitude: 0_i32,
17379        altitude: 0_i32,
17380        target_system: 0_u8,
17381        time_usec: 0_u64,
17382    };
17383    #[cfg(feature = "arbitrary")]
17384    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17385        use arbitrary::{Arbitrary, Unstructured};
17386        let mut buf = [0u8; 1024];
17387        rng.fill_bytes(&mut buf);
17388        let mut unstructured = Unstructured::new(&buf);
17389        Self::arbitrary(&mut unstructured).unwrap_or_default()
17390    }
17391}
17392impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
17393    fn default() -> Self {
17394        Self::DEFAULT.clone()
17395    }
17396}
17397impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
17398    type Message = MavMessage;
17399    const ID: u32 = 48u32;
17400    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
17401    const EXTRA_CRC: u8 = 41u8;
17402    const ENCODED_LEN: usize = 21usize;
17403    fn deser(
17404        _version: MavlinkVersion,
17405        __input: &[u8],
17406    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17407        let avail_len = __input.len();
17408        let mut payload_buf = [0; Self::ENCODED_LEN];
17409        let mut buf = if avail_len < Self::ENCODED_LEN {
17410            payload_buf[0..avail_len].copy_from_slice(__input);
17411            Bytes::new(&payload_buf)
17412        } else {
17413            Bytes::new(__input)
17414        };
17415        let mut __struct = Self::default();
17416        __struct.latitude = buf.get_i32_le();
17417        __struct.longitude = buf.get_i32_le();
17418        __struct.altitude = buf.get_i32_le();
17419        __struct.target_system = buf.get_u8();
17420        __struct.time_usec = buf.get_u64_le();
17421        Ok(__struct)
17422    }
17423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17424        let mut __tmp = BytesMut::new(bytes);
17425        #[allow(clippy::absurd_extreme_comparisons)]
17426        #[allow(unused_comparisons)]
17427        if __tmp.remaining() < Self::ENCODED_LEN {
17428            panic!(
17429                "buffer is too small (need {} bytes, but got {})",
17430                Self::ENCODED_LEN,
17431                __tmp.remaining(),
17432            )
17433        }
17434        __tmp.put_i32_le(self.latitude);
17435        __tmp.put_i32_le(self.longitude);
17436        __tmp.put_i32_le(self.altitude);
17437        __tmp.put_u8(self.target_system);
17438        __tmp.put_u64_le(self.time_usec);
17439        if matches!(version, MavlinkVersion::V2) {
17440            let len = __tmp.len();
17441            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17442        } else {
17443            __tmp.len()
17444        }
17445    }
17446}
17447#[doc = "id: 233"]
17448#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
17449#[derive(Debug, Clone, PartialEq)]
17450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17452pub struct GPS_RTCM_DATA_DATA {
17453    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
17454    pub flags: u8,
17455    #[doc = "data length"]
17456    pub len: u8,
17457    #[doc = "RTCM message (may be fragmented)"]
17458    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17459    pub data: [u8; 180],
17460}
17461impl GPS_RTCM_DATA_DATA {
17462    pub const ENCODED_LEN: usize = 182usize;
17463    pub const DEFAULT: Self = Self {
17464        flags: 0_u8,
17465        len: 0_u8,
17466        data: [0_u8; 180usize],
17467    };
17468    #[cfg(feature = "arbitrary")]
17469    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17470        use arbitrary::{Arbitrary, Unstructured};
17471        let mut buf = [0u8; 1024];
17472        rng.fill_bytes(&mut buf);
17473        let mut unstructured = Unstructured::new(&buf);
17474        Self::arbitrary(&mut unstructured).unwrap_or_default()
17475    }
17476}
17477impl Default for GPS_RTCM_DATA_DATA {
17478    fn default() -> Self {
17479        Self::DEFAULT.clone()
17480    }
17481}
17482impl MessageData for GPS_RTCM_DATA_DATA {
17483    type Message = MavMessage;
17484    const ID: u32 = 233u32;
17485    const NAME: &'static str = "GPS_RTCM_DATA";
17486    const EXTRA_CRC: u8 = 35u8;
17487    const ENCODED_LEN: usize = 182usize;
17488    fn deser(
17489        _version: MavlinkVersion,
17490        __input: &[u8],
17491    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17492        let avail_len = __input.len();
17493        let mut payload_buf = [0; Self::ENCODED_LEN];
17494        let mut buf = if avail_len < Self::ENCODED_LEN {
17495            payload_buf[0..avail_len].copy_from_slice(__input);
17496            Bytes::new(&payload_buf)
17497        } else {
17498            Bytes::new(__input)
17499        };
17500        let mut __struct = Self::default();
17501        __struct.flags = buf.get_u8();
17502        __struct.len = buf.get_u8();
17503        for v in &mut __struct.data {
17504            let val = buf.get_u8();
17505            *v = val;
17506        }
17507        Ok(__struct)
17508    }
17509    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17510        let mut __tmp = BytesMut::new(bytes);
17511        #[allow(clippy::absurd_extreme_comparisons)]
17512        #[allow(unused_comparisons)]
17513        if __tmp.remaining() < Self::ENCODED_LEN {
17514            panic!(
17515                "buffer is too small (need {} bytes, but got {})",
17516                Self::ENCODED_LEN,
17517                __tmp.remaining(),
17518            )
17519        }
17520        __tmp.put_u8(self.flags);
17521        __tmp.put_u8(self.len);
17522        for val in &self.data {
17523            __tmp.put_u8(*val);
17524        }
17525        if matches!(version, MavlinkVersion::V2) {
17526            let len = __tmp.len();
17527            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17528        } else {
17529            __tmp.len()
17530        }
17531    }
17532}
17533#[doc = "id: 12902"]
17534#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
17535#[derive(Debug, Clone, PartialEq)]
17536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17538pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
17539    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
17540    pub timestamp: u32,
17541    #[doc = "System ID (0 for broadcast)."]
17542    pub target_system: u8,
17543    #[doc = "Component ID (0 for broadcast)."]
17544    pub target_component: u8,
17545    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
17546    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17547    pub id_or_mac: [u8; 20],
17548    #[doc = "Indicates the type of authentication."]
17549    pub authentication_type: MavOdidAuthType,
17550    #[doc = "Allowed range is 0 - 15."]
17551    pub data_page: u8,
17552    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
17553    pub last_page_index: u8,
17554    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
17555    pub length: u8,
17556    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
17557    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17558    pub authentication_data: [u8; 23],
17559}
17560impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
17561    pub const ENCODED_LEN: usize = 53usize;
17562    pub const DEFAULT: Self = Self {
17563        timestamp: 0_u32,
17564        target_system: 0_u8,
17565        target_component: 0_u8,
17566        id_or_mac: [0_u8; 20usize],
17567        authentication_type: MavOdidAuthType::DEFAULT,
17568        data_page: 0_u8,
17569        last_page_index: 0_u8,
17570        length: 0_u8,
17571        authentication_data: [0_u8; 23usize],
17572    };
17573    #[cfg(feature = "arbitrary")]
17574    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17575        use arbitrary::{Arbitrary, Unstructured};
17576        let mut buf = [0u8; 1024];
17577        rng.fill_bytes(&mut buf);
17578        let mut unstructured = Unstructured::new(&buf);
17579        Self::arbitrary(&mut unstructured).unwrap_or_default()
17580    }
17581}
17582impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
17583    fn default() -> Self {
17584        Self::DEFAULT.clone()
17585    }
17586}
17587impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
17588    type Message = MavMessage;
17589    const ID: u32 = 12902u32;
17590    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
17591    const EXTRA_CRC: u8 = 140u8;
17592    const ENCODED_LEN: usize = 53usize;
17593    fn deser(
17594        _version: MavlinkVersion,
17595        __input: &[u8],
17596    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17597        let avail_len = __input.len();
17598        let mut payload_buf = [0; Self::ENCODED_LEN];
17599        let mut buf = if avail_len < Self::ENCODED_LEN {
17600            payload_buf[0..avail_len].copy_from_slice(__input);
17601            Bytes::new(&payload_buf)
17602        } else {
17603            Bytes::new(__input)
17604        };
17605        let mut __struct = Self::default();
17606        __struct.timestamp = buf.get_u32_le();
17607        __struct.target_system = buf.get_u8();
17608        __struct.target_component = buf.get_u8();
17609        for v in &mut __struct.id_or_mac {
17610            let val = buf.get_u8();
17611            *v = val;
17612        }
17613        let tmp = buf.get_u8();
17614        __struct.authentication_type =
17615            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17616                enum_type: "MavOdidAuthType",
17617                value: tmp as u32,
17618            })?;
17619        __struct.data_page = buf.get_u8();
17620        __struct.last_page_index = buf.get_u8();
17621        __struct.length = buf.get_u8();
17622        for v in &mut __struct.authentication_data {
17623            let val = buf.get_u8();
17624            *v = val;
17625        }
17626        Ok(__struct)
17627    }
17628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17629        let mut __tmp = BytesMut::new(bytes);
17630        #[allow(clippy::absurd_extreme_comparisons)]
17631        #[allow(unused_comparisons)]
17632        if __tmp.remaining() < Self::ENCODED_LEN {
17633            panic!(
17634                "buffer is too small (need {} bytes, but got {})",
17635                Self::ENCODED_LEN,
17636                __tmp.remaining(),
17637            )
17638        }
17639        __tmp.put_u32_le(self.timestamp);
17640        __tmp.put_u8(self.target_system);
17641        __tmp.put_u8(self.target_component);
17642        for val in &self.id_or_mac {
17643            __tmp.put_u8(*val);
17644        }
17645        __tmp.put_u8(self.authentication_type as u8);
17646        __tmp.put_u8(self.data_page);
17647        __tmp.put_u8(self.last_page_index);
17648        __tmp.put_u8(self.length);
17649        for val in &self.authentication_data {
17650            __tmp.put_u8(*val);
17651        }
17652        if matches!(version, MavlinkVersion::V2) {
17653            let len = __tmp.len();
17654            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17655        } else {
17656            __tmp.len()
17657        }
17658    }
17659}
17660#[doc = "id: 281"]
17661#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
17662#[derive(Debug, Clone, PartialEq)]
17663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17665pub struct GIMBAL_MANAGER_STATUS_DATA {
17666    #[doc = "Timestamp (time since system boot)."]
17667    pub time_boot_ms: u32,
17668    #[doc = "High level gimbal manager flags currently applied."]
17669    pub flags: GimbalManagerFlags,
17670    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
17671    pub gimbal_device_id: u8,
17672    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
17673    pub primary_control_sysid: u8,
17674    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
17675    pub primary_control_compid: u8,
17676    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
17677    pub secondary_control_sysid: u8,
17678    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
17679    pub secondary_control_compid: u8,
17680}
17681impl GIMBAL_MANAGER_STATUS_DATA {
17682    pub const ENCODED_LEN: usize = 13usize;
17683    pub const DEFAULT: Self = Self {
17684        time_boot_ms: 0_u32,
17685        flags: GimbalManagerFlags::DEFAULT,
17686        gimbal_device_id: 0_u8,
17687        primary_control_sysid: 0_u8,
17688        primary_control_compid: 0_u8,
17689        secondary_control_sysid: 0_u8,
17690        secondary_control_compid: 0_u8,
17691    };
17692    #[cfg(feature = "arbitrary")]
17693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17694        use arbitrary::{Arbitrary, Unstructured};
17695        let mut buf = [0u8; 1024];
17696        rng.fill_bytes(&mut buf);
17697        let mut unstructured = Unstructured::new(&buf);
17698        Self::arbitrary(&mut unstructured).unwrap_or_default()
17699    }
17700}
17701impl Default for GIMBAL_MANAGER_STATUS_DATA {
17702    fn default() -> Self {
17703        Self::DEFAULT.clone()
17704    }
17705}
17706impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
17707    type Message = MavMessage;
17708    const ID: u32 = 281u32;
17709    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
17710    const EXTRA_CRC: u8 = 48u8;
17711    const ENCODED_LEN: usize = 13usize;
17712    fn deser(
17713        _version: MavlinkVersion,
17714        __input: &[u8],
17715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17716        let avail_len = __input.len();
17717        let mut payload_buf = [0; Self::ENCODED_LEN];
17718        let mut buf = if avail_len < Self::ENCODED_LEN {
17719            payload_buf[0..avail_len].copy_from_slice(__input);
17720            Bytes::new(&payload_buf)
17721        } else {
17722            Bytes::new(__input)
17723        };
17724        let mut __struct = Self::default();
17725        __struct.time_boot_ms = buf.get_u32_le();
17726        let tmp = buf.get_u32_le();
17727        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
17728            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17729                flag_type: "GimbalManagerFlags",
17730                value: tmp as u32,
17731            })?;
17732        __struct.gimbal_device_id = buf.get_u8();
17733        __struct.primary_control_sysid = buf.get_u8();
17734        __struct.primary_control_compid = buf.get_u8();
17735        __struct.secondary_control_sysid = buf.get_u8();
17736        __struct.secondary_control_compid = buf.get_u8();
17737        Ok(__struct)
17738    }
17739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17740        let mut __tmp = BytesMut::new(bytes);
17741        #[allow(clippy::absurd_extreme_comparisons)]
17742        #[allow(unused_comparisons)]
17743        if __tmp.remaining() < Self::ENCODED_LEN {
17744            panic!(
17745                "buffer is too small (need {} bytes, but got {})",
17746                Self::ENCODED_LEN,
17747                __tmp.remaining(),
17748            )
17749        }
17750        __tmp.put_u32_le(self.time_boot_ms);
17751        __tmp.put_u32_le(self.flags.bits());
17752        __tmp.put_u8(self.gimbal_device_id);
17753        __tmp.put_u8(self.primary_control_sysid);
17754        __tmp.put_u8(self.primary_control_compid);
17755        __tmp.put_u8(self.secondary_control_sysid);
17756        __tmp.put_u8(self.secondary_control_compid);
17757        if matches!(version, MavlinkVersion::V2) {
17758            let len = __tmp.len();
17759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17760        } else {
17761            __tmp.len()
17762        }
17763    }
17764}
17765#[doc = "id: 35"]
17766#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
17767#[derive(Debug, Clone, PartialEq)]
17768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17770pub struct RC_CHANNELS_RAW_DATA {
17771    #[doc = "Timestamp (time since system boot)."]
17772    pub time_boot_ms: u32,
17773    #[doc = "RC channel 1 value."]
17774    pub chan1_raw: u16,
17775    #[doc = "RC channel 2 value."]
17776    pub chan2_raw: u16,
17777    #[doc = "RC channel 3 value."]
17778    pub chan3_raw: u16,
17779    #[doc = "RC channel 4 value."]
17780    pub chan4_raw: u16,
17781    #[doc = "RC channel 5 value."]
17782    pub chan5_raw: u16,
17783    #[doc = "RC channel 6 value."]
17784    pub chan6_raw: u16,
17785    #[doc = "RC channel 7 value."]
17786    pub chan7_raw: u16,
17787    #[doc = "RC channel 8 value."]
17788    pub chan8_raw: u16,
17789    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
17790    pub port: u8,
17791    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
17792    pub rssi: u8,
17793}
17794impl RC_CHANNELS_RAW_DATA {
17795    pub const ENCODED_LEN: usize = 22usize;
17796    pub const DEFAULT: Self = Self {
17797        time_boot_ms: 0_u32,
17798        chan1_raw: 0_u16,
17799        chan2_raw: 0_u16,
17800        chan3_raw: 0_u16,
17801        chan4_raw: 0_u16,
17802        chan5_raw: 0_u16,
17803        chan6_raw: 0_u16,
17804        chan7_raw: 0_u16,
17805        chan8_raw: 0_u16,
17806        port: 0_u8,
17807        rssi: 0_u8,
17808    };
17809    #[cfg(feature = "arbitrary")]
17810    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17811        use arbitrary::{Arbitrary, Unstructured};
17812        let mut buf = [0u8; 1024];
17813        rng.fill_bytes(&mut buf);
17814        let mut unstructured = Unstructured::new(&buf);
17815        Self::arbitrary(&mut unstructured).unwrap_or_default()
17816    }
17817}
17818impl Default for RC_CHANNELS_RAW_DATA {
17819    fn default() -> Self {
17820        Self::DEFAULT.clone()
17821    }
17822}
17823impl MessageData for RC_CHANNELS_RAW_DATA {
17824    type Message = MavMessage;
17825    const ID: u32 = 35u32;
17826    const NAME: &'static str = "RC_CHANNELS_RAW";
17827    const EXTRA_CRC: u8 = 244u8;
17828    const ENCODED_LEN: usize = 22usize;
17829    fn deser(
17830        _version: MavlinkVersion,
17831        __input: &[u8],
17832    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17833        let avail_len = __input.len();
17834        let mut payload_buf = [0; Self::ENCODED_LEN];
17835        let mut buf = if avail_len < Self::ENCODED_LEN {
17836            payload_buf[0..avail_len].copy_from_slice(__input);
17837            Bytes::new(&payload_buf)
17838        } else {
17839            Bytes::new(__input)
17840        };
17841        let mut __struct = Self::default();
17842        __struct.time_boot_ms = buf.get_u32_le();
17843        __struct.chan1_raw = buf.get_u16_le();
17844        __struct.chan2_raw = buf.get_u16_le();
17845        __struct.chan3_raw = buf.get_u16_le();
17846        __struct.chan4_raw = buf.get_u16_le();
17847        __struct.chan5_raw = buf.get_u16_le();
17848        __struct.chan6_raw = buf.get_u16_le();
17849        __struct.chan7_raw = buf.get_u16_le();
17850        __struct.chan8_raw = buf.get_u16_le();
17851        __struct.port = buf.get_u8();
17852        __struct.rssi = buf.get_u8();
17853        Ok(__struct)
17854    }
17855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17856        let mut __tmp = BytesMut::new(bytes);
17857        #[allow(clippy::absurd_extreme_comparisons)]
17858        #[allow(unused_comparisons)]
17859        if __tmp.remaining() < Self::ENCODED_LEN {
17860            panic!(
17861                "buffer is too small (need {} bytes, but got {})",
17862                Self::ENCODED_LEN,
17863                __tmp.remaining(),
17864            )
17865        }
17866        __tmp.put_u32_le(self.time_boot_ms);
17867        __tmp.put_u16_le(self.chan1_raw);
17868        __tmp.put_u16_le(self.chan2_raw);
17869        __tmp.put_u16_le(self.chan3_raw);
17870        __tmp.put_u16_le(self.chan4_raw);
17871        __tmp.put_u16_le(self.chan5_raw);
17872        __tmp.put_u16_le(self.chan6_raw);
17873        __tmp.put_u16_le(self.chan7_raw);
17874        __tmp.put_u16_le(self.chan8_raw);
17875        __tmp.put_u8(self.port);
17876        __tmp.put_u8(self.rssi);
17877        if matches!(version, MavlinkVersion::V2) {
17878            let len = __tmp.len();
17879            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17880        } else {
17881            __tmp.len()
17882        }
17883    }
17884}
17885#[doc = "id: 435"]
17886#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
17887#[derive(Debug, Clone, PartialEq)]
17888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17890pub struct AVAILABLE_MODES_DATA {
17891    #[doc = "A bitfield for use for autopilot-specific flags"]
17892    pub custom_mode: u32,
17893    #[doc = "Mode properties."]
17894    pub properties: MavModeProperty,
17895    #[doc = "The total number of available modes for the current vehicle type."]
17896    pub number_modes: u8,
17897    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
17898    pub mode_index: u8,
17899    #[doc = "Standard mode."]
17900    pub standard_mode: MavStandardMode,
17901    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
17902    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17903    pub mode_name: [u8; 35],
17904}
17905impl AVAILABLE_MODES_DATA {
17906    pub const ENCODED_LEN: usize = 46usize;
17907    pub const DEFAULT: Self = Self {
17908        custom_mode: 0_u32,
17909        properties: MavModeProperty::DEFAULT,
17910        number_modes: 0_u8,
17911        mode_index: 0_u8,
17912        standard_mode: MavStandardMode::DEFAULT,
17913        mode_name: [0_u8; 35usize],
17914    };
17915    #[cfg(feature = "arbitrary")]
17916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17917        use arbitrary::{Arbitrary, Unstructured};
17918        let mut buf = [0u8; 1024];
17919        rng.fill_bytes(&mut buf);
17920        let mut unstructured = Unstructured::new(&buf);
17921        Self::arbitrary(&mut unstructured).unwrap_or_default()
17922    }
17923}
17924impl Default for AVAILABLE_MODES_DATA {
17925    fn default() -> Self {
17926        Self::DEFAULT.clone()
17927    }
17928}
17929impl MessageData for AVAILABLE_MODES_DATA {
17930    type Message = MavMessage;
17931    const ID: u32 = 435u32;
17932    const NAME: &'static str = "AVAILABLE_MODES";
17933    const EXTRA_CRC: u8 = 134u8;
17934    const ENCODED_LEN: usize = 46usize;
17935    fn deser(
17936        _version: MavlinkVersion,
17937        __input: &[u8],
17938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17939        let avail_len = __input.len();
17940        let mut payload_buf = [0; Self::ENCODED_LEN];
17941        let mut buf = if avail_len < Self::ENCODED_LEN {
17942            payload_buf[0..avail_len].copy_from_slice(__input);
17943            Bytes::new(&payload_buf)
17944        } else {
17945            Bytes::new(__input)
17946        };
17947        let mut __struct = Self::default();
17948        __struct.custom_mode = buf.get_u32_le();
17949        let tmp = buf.get_u32_le();
17950        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
17951            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17952                flag_type: "MavModeProperty",
17953                value: tmp as u32,
17954            })?;
17955        __struct.number_modes = buf.get_u8();
17956        __struct.mode_index = buf.get_u8();
17957        let tmp = buf.get_u8();
17958        __struct.standard_mode =
17959            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17960                enum_type: "MavStandardMode",
17961                value: tmp as u32,
17962            })?;
17963        for v in &mut __struct.mode_name {
17964            let val = buf.get_u8();
17965            *v = val;
17966        }
17967        Ok(__struct)
17968    }
17969    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17970        let mut __tmp = BytesMut::new(bytes);
17971        #[allow(clippy::absurd_extreme_comparisons)]
17972        #[allow(unused_comparisons)]
17973        if __tmp.remaining() < Self::ENCODED_LEN {
17974            panic!(
17975                "buffer is too small (need {} bytes, but got {})",
17976                Self::ENCODED_LEN,
17977                __tmp.remaining(),
17978            )
17979        }
17980        __tmp.put_u32_le(self.custom_mode);
17981        __tmp.put_u32_le(self.properties.bits());
17982        __tmp.put_u8(self.number_modes);
17983        __tmp.put_u8(self.mode_index);
17984        __tmp.put_u8(self.standard_mode as u8);
17985        for val in &self.mode_name {
17986            __tmp.put_u8(*val);
17987        }
17988        if matches!(version, MavlinkVersion::V2) {
17989            let len = __tmp.len();
17990            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17991        } else {
17992            __tmp.len()
17993        }
17994    }
17995}
17996#[doc = "id: 149"]
17997#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17998#[derive(Debug, Clone, PartialEq)]
17999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18001pub struct LANDING_TARGET_DATA {
18002    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18003    pub time_usec: u64,
18004    #[doc = "X-axis angular offset of the target from the center of the image"]
18005    pub angle_x: f32,
18006    #[doc = "Y-axis angular offset of the target from the center of the image"]
18007    pub angle_y: f32,
18008    #[doc = "Distance to the target from the vehicle"]
18009    pub distance: f32,
18010    #[doc = "Size of target along x-axis"]
18011    pub size_x: f32,
18012    #[doc = "Size of target along y-axis"]
18013    pub size_y: f32,
18014    #[doc = "The ID of the target if multiple targets are present"]
18015    pub target_num: u8,
18016    #[doc = "Coordinate frame used for following fields."]
18017    pub frame: MavFrame,
18018    #[doc = "X Position of the landing target in MAV_FRAME"]
18019    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18020    pub x: f32,
18021    #[doc = "Y Position of the landing target in MAV_FRAME"]
18022    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18023    pub y: f32,
18024    #[doc = "Z Position of the landing target in MAV_FRAME"]
18025    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18026    pub z: f32,
18027    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18028    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18029    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18030    pub q: [f32; 4],
18031    #[doc = "Type of landing target"]
18032    #[cfg_attr(feature = "serde", serde(default))]
18033    pub mavtype: LandingTargetType,
18034    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18035    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18036    pub position_valid: u8,
18037}
18038impl LANDING_TARGET_DATA {
18039    pub const ENCODED_LEN: usize = 60usize;
18040    pub const DEFAULT: Self = Self {
18041        time_usec: 0_u64,
18042        angle_x: 0.0_f32,
18043        angle_y: 0.0_f32,
18044        distance: 0.0_f32,
18045        size_x: 0.0_f32,
18046        size_y: 0.0_f32,
18047        target_num: 0_u8,
18048        frame: MavFrame::DEFAULT,
18049        x: 0.0_f32,
18050        y: 0.0_f32,
18051        z: 0.0_f32,
18052        q: [0.0_f32; 4usize],
18053        mavtype: LandingTargetType::DEFAULT,
18054        position_valid: 0_u8,
18055    };
18056    #[cfg(feature = "arbitrary")]
18057    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18058        use arbitrary::{Arbitrary, Unstructured};
18059        let mut buf = [0u8; 1024];
18060        rng.fill_bytes(&mut buf);
18061        let mut unstructured = Unstructured::new(&buf);
18062        Self::arbitrary(&mut unstructured).unwrap_or_default()
18063    }
18064}
18065impl Default for LANDING_TARGET_DATA {
18066    fn default() -> Self {
18067        Self::DEFAULT.clone()
18068    }
18069}
18070impl MessageData for LANDING_TARGET_DATA {
18071    type Message = MavMessage;
18072    const ID: u32 = 149u32;
18073    const NAME: &'static str = "LANDING_TARGET";
18074    const EXTRA_CRC: u8 = 200u8;
18075    const ENCODED_LEN: usize = 60usize;
18076    fn deser(
18077        _version: MavlinkVersion,
18078        __input: &[u8],
18079    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18080        let avail_len = __input.len();
18081        let mut payload_buf = [0; Self::ENCODED_LEN];
18082        let mut buf = if avail_len < Self::ENCODED_LEN {
18083            payload_buf[0..avail_len].copy_from_slice(__input);
18084            Bytes::new(&payload_buf)
18085        } else {
18086            Bytes::new(__input)
18087        };
18088        let mut __struct = Self::default();
18089        __struct.time_usec = buf.get_u64_le();
18090        __struct.angle_x = buf.get_f32_le();
18091        __struct.angle_y = buf.get_f32_le();
18092        __struct.distance = buf.get_f32_le();
18093        __struct.size_x = buf.get_f32_le();
18094        __struct.size_y = buf.get_f32_le();
18095        __struct.target_num = buf.get_u8();
18096        let tmp = buf.get_u8();
18097        __struct.frame =
18098            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18099                enum_type: "MavFrame",
18100                value: tmp as u32,
18101            })?;
18102        __struct.x = buf.get_f32_le();
18103        __struct.y = buf.get_f32_le();
18104        __struct.z = buf.get_f32_le();
18105        for v in &mut __struct.q {
18106            let val = buf.get_f32_le();
18107            *v = val;
18108        }
18109        let tmp = buf.get_u8();
18110        __struct.mavtype =
18111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18112                enum_type: "LandingTargetType",
18113                value: tmp as u32,
18114            })?;
18115        __struct.position_valid = buf.get_u8();
18116        Ok(__struct)
18117    }
18118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18119        let mut __tmp = BytesMut::new(bytes);
18120        #[allow(clippy::absurd_extreme_comparisons)]
18121        #[allow(unused_comparisons)]
18122        if __tmp.remaining() < Self::ENCODED_LEN {
18123            panic!(
18124                "buffer is too small (need {} bytes, but got {})",
18125                Self::ENCODED_LEN,
18126                __tmp.remaining(),
18127            )
18128        }
18129        __tmp.put_u64_le(self.time_usec);
18130        __tmp.put_f32_le(self.angle_x);
18131        __tmp.put_f32_le(self.angle_y);
18132        __tmp.put_f32_le(self.distance);
18133        __tmp.put_f32_le(self.size_x);
18134        __tmp.put_f32_le(self.size_y);
18135        __tmp.put_u8(self.target_num);
18136        __tmp.put_u8(self.frame as u8);
18137        __tmp.put_f32_le(self.x);
18138        __tmp.put_f32_le(self.y);
18139        __tmp.put_f32_le(self.z);
18140        for val in &self.q {
18141            __tmp.put_f32_le(*val);
18142        }
18143        __tmp.put_u8(self.mavtype as u8);
18144        __tmp.put_u8(self.position_valid);
18145        if matches!(version, MavlinkVersion::V2) {
18146            let len = __tmp.len();
18147            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18148        } else {
18149            __tmp.len()
18150        }
18151    }
18152}
18153#[doc = "id: 321"]
18154#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
18155#[derive(Debug, Clone, PartialEq)]
18156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18158pub struct PARAM_EXT_REQUEST_LIST_DATA {
18159    #[doc = "System ID"]
18160    pub target_system: u8,
18161    #[doc = "Component ID"]
18162    pub target_component: u8,
18163}
18164impl PARAM_EXT_REQUEST_LIST_DATA {
18165    pub const ENCODED_LEN: usize = 2usize;
18166    pub const DEFAULT: Self = Self {
18167        target_system: 0_u8,
18168        target_component: 0_u8,
18169    };
18170    #[cfg(feature = "arbitrary")]
18171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18172        use arbitrary::{Arbitrary, Unstructured};
18173        let mut buf = [0u8; 1024];
18174        rng.fill_bytes(&mut buf);
18175        let mut unstructured = Unstructured::new(&buf);
18176        Self::arbitrary(&mut unstructured).unwrap_or_default()
18177    }
18178}
18179impl Default for PARAM_EXT_REQUEST_LIST_DATA {
18180    fn default() -> Self {
18181        Self::DEFAULT.clone()
18182    }
18183}
18184impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
18185    type Message = MavMessage;
18186    const ID: u32 = 321u32;
18187    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
18188    const EXTRA_CRC: u8 = 88u8;
18189    const ENCODED_LEN: usize = 2usize;
18190    fn deser(
18191        _version: MavlinkVersion,
18192        __input: &[u8],
18193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18194        let avail_len = __input.len();
18195        let mut payload_buf = [0; Self::ENCODED_LEN];
18196        let mut buf = if avail_len < Self::ENCODED_LEN {
18197            payload_buf[0..avail_len].copy_from_slice(__input);
18198            Bytes::new(&payload_buf)
18199        } else {
18200            Bytes::new(__input)
18201        };
18202        let mut __struct = Self::default();
18203        __struct.target_system = buf.get_u8();
18204        __struct.target_component = buf.get_u8();
18205        Ok(__struct)
18206    }
18207    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18208        let mut __tmp = BytesMut::new(bytes);
18209        #[allow(clippy::absurd_extreme_comparisons)]
18210        #[allow(unused_comparisons)]
18211        if __tmp.remaining() < Self::ENCODED_LEN {
18212            panic!(
18213                "buffer is too small (need {} bytes, but got {})",
18214                Self::ENCODED_LEN,
18215                __tmp.remaining(),
18216            )
18217        }
18218        __tmp.put_u8(self.target_system);
18219        __tmp.put_u8(self.target_component);
18220        if matches!(version, MavlinkVersion::V2) {
18221            let len = __tmp.len();
18222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18223        } else {
18224            __tmp.len()
18225        }
18226    }
18227}
18228#[doc = "id: 103"]
18229#[doc = "Speed estimate from a vision source."]
18230#[derive(Debug, Clone, PartialEq)]
18231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18233pub struct VISION_SPEED_ESTIMATE_DATA {
18234    #[doc = "Timestamp (UNIX time or time since system boot)"]
18235    pub usec: u64,
18236    #[doc = "Global X speed"]
18237    pub x: f32,
18238    #[doc = "Global Y speed"]
18239    pub y: f32,
18240    #[doc = "Global Z speed"]
18241    pub z: f32,
18242    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
18243    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18245    pub covariance: [f32; 9],
18246    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
18247    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18248    pub reset_counter: u8,
18249}
18250impl VISION_SPEED_ESTIMATE_DATA {
18251    pub const ENCODED_LEN: usize = 57usize;
18252    pub const DEFAULT: Self = Self {
18253        usec: 0_u64,
18254        x: 0.0_f32,
18255        y: 0.0_f32,
18256        z: 0.0_f32,
18257        covariance: [0.0_f32; 9usize],
18258        reset_counter: 0_u8,
18259    };
18260    #[cfg(feature = "arbitrary")]
18261    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18262        use arbitrary::{Arbitrary, Unstructured};
18263        let mut buf = [0u8; 1024];
18264        rng.fill_bytes(&mut buf);
18265        let mut unstructured = Unstructured::new(&buf);
18266        Self::arbitrary(&mut unstructured).unwrap_or_default()
18267    }
18268}
18269impl Default for VISION_SPEED_ESTIMATE_DATA {
18270    fn default() -> Self {
18271        Self::DEFAULT.clone()
18272    }
18273}
18274impl MessageData for VISION_SPEED_ESTIMATE_DATA {
18275    type Message = MavMessage;
18276    const ID: u32 = 103u32;
18277    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
18278    const EXTRA_CRC: u8 = 208u8;
18279    const ENCODED_LEN: usize = 57usize;
18280    fn deser(
18281        _version: MavlinkVersion,
18282        __input: &[u8],
18283    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18284        let avail_len = __input.len();
18285        let mut payload_buf = [0; Self::ENCODED_LEN];
18286        let mut buf = if avail_len < Self::ENCODED_LEN {
18287            payload_buf[0..avail_len].copy_from_slice(__input);
18288            Bytes::new(&payload_buf)
18289        } else {
18290            Bytes::new(__input)
18291        };
18292        let mut __struct = Self::default();
18293        __struct.usec = buf.get_u64_le();
18294        __struct.x = buf.get_f32_le();
18295        __struct.y = buf.get_f32_le();
18296        __struct.z = buf.get_f32_le();
18297        for v in &mut __struct.covariance {
18298            let val = buf.get_f32_le();
18299            *v = val;
18300        }
18301        __struct.reset_counter = buf.get_u8();
18302        Ok(__struct)
18303    }
18304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18305        let mut __tmp = BytesMut::new(bytes);
18306        #[allow(clippy::absurd_extreme_comparisons)]
18307        #[allow(unused_comparisons)]
18308        if __tmp.remaining() < Self::ENCODED_LEN {
18309            panic!(
18310                "buffer is too small (need {} bytes, but got {})",
18311                Self::ENCODED_LEN,
18312                __tmp.remaining(),
18313            )
18314        }
18315        __tmp.put_u64_le(self.usec);
18316        __tmp.put_f32_le(self.x);
18317        __tmp.put_f32_le(self.y);
18318        __tmp.put_f32_le(self.z);
18319        for val in &self.covariance {
18320            __tmp.put_f32_le(*val);
18321        }
18322        __tmp.put_u8(self.reset_counter);
18323        if matches!(version, MavlinkVersion::V2) {
18324            let len = __tmp.len();
18325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18326        } else {
18327            __tmp.len()
18328        }
18329    }
18330}
18331#[doc = "id: 299"]
18332#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
18333#[derive(Debug, Clone, PartialEq)]
18334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18336pub struct WIFI_CONFIG_AP_DATA {
18337    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
18338    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18339    pub ssid: [u8; 32],
18340    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
18341    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18342    pub password: [u8; 64],
18343    #[doc = "WiFi Mode."]
18344    #[cfg_attr(feature = "serde", serde(default))]
18345    pub mode: WifiConfigApMode,
18346    #[doc = "Message acceptance response (sent back to GS)."]
18347    #[cfg_attr(feature = "serde", serde(default))]
18348    pub response: WifiConfigApResponse,
18349}
18350impl WIFI_CONFIG_AP_DATA {
18351    pub const ENCODED_LEN: usize = 98usize;
18352    pub const DEFAULT: Self = Self {
18353        ssid: [0_u8; 32usize],
18354        password: [0_u8; 64usize],
18355        mode: WifiConfigApMode::DEFAULT,
18356        response: WifiConfigApResponse::DEFAULT,
18357    };
18358    #[cfg(feature = "arbitrary")]
18359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18360        use arbitrary::{Arbitrary, Unstructured};
18361        let mut buf = [0u8; 1024];
18362        rng.fill_bytes(&mut buf);
18363        let mut unstructured = Unstructured::new(&buf);
18364        Self::arbitrary(&mut unstructured).unwrap_or_default()
18365    }
18366}
18367impl Default for WIFI_CONFIG_AP_DATA {
18368    fn default() -> Self {
18369        Self::DEFAULT.clone()
18370    }
18371}
18372impl MessageData for WIFI_CONFIG_AP_DATA {
18373    type Message = MavMessage;
18374    const ID: u32 = 299u32;
18375    const NAME: &'static str = "WIFI_CONFIG_AP";
18376    const EXTRA_CRC: u8 = 19u8;
18377    const ENCODED_LEN: usize = 98usize;
18378    fn deser(
18379        _version: MavlinkVersion,
18380        __input: &[u8],
18381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18382        let avail_len = __input.len();
18383        let mut payload_buf = [0; Self::ENCODED_LEN];
18384        let mut buf = if avail_len < Self::ENCODED_LEN {
18385            payload_buf[0..avail_len].copy_from_slice(__input);
18386            Bytes::new(&payload_buf)
18387        } else {
18388            Bytes::new(__input)
18389        };
18390        let mut __struct = Self::default();
18391        for v in &mut __struct.ssid {
18392            let val = buf.get_u8();
18393            *v = val;
18394        }
18395        for v in &mut __struct.password {
18396            let val = buf.get_u8();
18397            *v = val;
18398        }
18399        let tmp = buf.get_i8();
18400        __struct.mode =
18401            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18402                enum_type: "WifiConfigApMode",
18403                value: tmp as u32,
18404            })?;
18405        let tmp = buf.get_i8();
18406        __struct.response =
18407            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18408                enum_type: "WifiConfigApResponse",
18409                value: tmp as u32,
18410            })?;
18411        Ok(__struct)
18412    }
18413    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18414        let mut __tmp = BytesMut::new(bytes);
18415        #[allow(clippy::absurd_extreme_comparisons)]
18416        #[allow(unused_comparisons)]
18417        if __tmp.remaining() < Self::ENCODED_LEN {
18418            panic!(
18419                "buffer is too small (need {} bytes, but got {})",
18420                Self::ENCODED_LEN,
18421                __tmp.remaining(),
18422            )
18423        }
18424        for val in &self.ssid {
18425            __tmp.put_u8(*val);
18426        }
18427        for val in &self.password {
18428            __tmp.put_u8(*val);
18429        }
18430        __tmp.put_i8(self.mode as i8);
18431        __tmp.put_i8(self.response as i8);
18432        if matches!(version, MavlinkVersion::V2) {
18433            let len = __tmp.len();
18434            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18435        } else {
18436            __tmp.len()
18437        }
18438    }
18439}
18440#[doc = "id: 104"]
18441#[doc = "Global position estimate from a Vicon motion system source."]
18442#[derive(Debug, Clone, PartialEq)]
18443#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18444#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18445pub struct VICON_POSITION_ESTIMATE_DATA {
18446    #[doc = "Timestamp (UNIX time or time since system boot)"]
18447    pub usec: u64,
18448    #[doc = "Global X position"]
18449    pub x: f32,
18450    #[doc = "Global Y position"]
18451    pub y: f32,
18452    #[doc = "Global Z position"]
18453    pub z: f32,
18454    #[doc = "Roll angle"]
18455    pub roll: f32,
18456    #[doc = "Pitch angle"]
18457    pub pitch: f32,
18458    #[doc = "Yaw angle"]
18459    pub yaw: f32,
18460    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
18461    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18462    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18463    pub covariance: [f32; 21],
18464}
18465impl VICON_POSITION_ESTIMATE_DATA {
18466    pub const ENCODED_LEN: usize = 116usize;
18467    pub const DEFAULT: Self = Self {
18468        usec: 0_u64,
18469        x: 0.0_f32,
18470        y: 0.0_f32,
18471        z: 0.0_f32,
18472        roll: 0.0_f32,
18473        pitch: 0.0_f32,
18474        yaw: 0.0_f32,
18475        covariance: [0.0_f32; 21usize],
18476    };
18477    #[cfg(feature = "arbitrary")]
18478    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18479        use arbitrary::{Arbitrary, Unstructured};
18480        let mut buf = [0u8; 1024];
18481        rng.fill_bytes(&mut buf);
18482        let mut unstructured = Unstructured::new(&buf);
18483        Self::arbitrary(&mut unstructured).unwrap_or_default()
18484    }
18485}
18486impl Default for VICON_POSITION_ESTIMATE_DATA {
18487    fn default() -> Self {
18488        Self::DEFAULT.clone()
18489    }
18490}
18491impl MessageData for VICON_POSITION_ESTIMATE_DATA {
18492    type Message = MavMessage;
18493    const ID: u32 = 104u32;
18494    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
18495    const EXTRA_CRC: u8 = 56u8;
18496    const ENCODED_LEN: usize = 116usize;
18497    fn deser(
18498        _version: MavlinkVersion,
18499        __input: &[u8],
18500    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18501        let avail_len = __input.len();
18502        let mut payload_buf = [0; Self::ENCODED_LEN];
18503        let mut buf = if avail_len < Self::ENCODED_LEN {
18504            payload_buf[0..avail_len].copy_from_slice(__input);
18505            Bytes::new(&payload_buf)
18506        } else {
18507            Bytes::new(__input)
18508        };
18509        let mut __struct = Self::default();
18510        __struct.usec = buf.get_u64_le();
18511        __struct.x = buf.get_f32_le();
18512        __struct.y = buf.get_f32_le();
18513        __struct.z = buf.get_f32_le();
18514        __struct.roll = buf.get_f32_le();
18515        __struct.pitch = buf.get_f32_le();
18516        __struct.yaw = buf.get_f32_le();
18517        for v in &mut __struct.covariance {
18518            let val = buf.get_f32_le();
18519            *v = val;
18520        }
18521        Ok(__struct)
18522    }
18523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18524        let mut __tmp = BytesMut::new(bytes);
18525        #[allow(clippy::absurd_extreme_comparisons)]
18526        #[allow(unused_comparisons)]
18527        if __tmp.remaining() < Self::ENCODED_LEN {
18528            panic!(
18529                "buffer is too small (need {} bytes, but got {})",
18530                Self::ENCODED_LEN,
18531                __tmp.remaining(),
18532            )
18533        }
18534        __tmp.put_u64_le(self.usec);
18535        __tmp.put_f32_le(self.x);
18536        __tmp.put_f32_le(self.y);
18537        __tmp.put_f32_le(self.z);
18538        __tmp.put_f32_le(self.roll);
18539        __tmp.put_f32_le(self.pitch);
18540        __tmp.put_f32_le(self.yaw);
18541        for val in &self.covariance {
18542            __tmp.put_f32_le(*val);
18543        }
18544        if matches!(version, MavlinkVersion::V2) {
18545            let len = __tmp.len();
18546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18547        } else {
18548            __tmp.len()
18549        }
18550    }
18551}
18552#[doc = "id: 12901"]
18553#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
18554#[derive(Debug, Clone, PartialEq)]
18555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18557pub struct OPEN_DRONE_ID_LOCATION_DATA {
18558    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
18559    pub latitude: i32,
18560    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
18561    pub longitude: i32,
18562    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
18563    pub altitude_barometric: f32,
18564    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
18565    pub altitude_geodetic: f32,
18566    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
18567    pub height: f32,
18568    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
18569    pub timestamp: f32,
18570    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
18571    pub direction: u16,
18572    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
18573    pub speed_horizontal: u16,
18574    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
18575    pub speed_vertical: i16,
18576    #[doc = "System ID (0 for broadcast)."]
18577    pub target_system: u8,
18578    #[doc = "Component ID (0 for broadcast)."]
18579    pub target_component: u8,
18580    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
18581    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18582    pub id_or_mac: [u8; 20],
18583    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
18584    pub status: MavOdidStatus,
18585    #[doc = "Indicates the reference point for the height field."]
18586    pub height_reference: MavOdidHeightRef,
18587    #[doc = "The accuracy of the horizontal position."]
18588    pub horizontal_accuracy: MavOdidHorAcc,
18589    #[doc = "The accuracy of the vertical position."]
18590    pub vertical_accuracy: MavOdidVerAcc,
18591    #[doc = "The accuracy of the barometric altitude."]
18592    pub barometer_accuracy: MavOdidVerAcc,
18593    #[doc = "The accuracy of the horizontal and vertical speed."]
18594    pub speed_accuracy: MavOdidSpeedAcc,
18595    #[doc = "The accuracy of the timestamps."]
18596    pub timestamp_accuracy: MavOdidTimeAcc,
18597}
18598impl OPEN_DRONE_ID_LOCATION_DATA {
18599    pub const ENCODED_LEN: usize = 59usize;
18600    pub const DEFAULT: Self = Self {
18601        latitude: 0_i32,
18602        longitude: 0_i32,
18603        altitude_barometric: 0.0_f32,
18604        altitude_geodetic: 0.0_f32,
18605        height: 0.0_f32,
18606        timestamp: 0.0_f32,
18607        direction: 0_u16,
18608        speed_horizontal: 0_u16,
18609        speed_vertical: 0_i16,
18610        target_system: 0_u8,
18611        target_component: 0_u8,
18612        id_or_mac: [0_u8; 20usize],
18613        status: MavOdidStatus::DEFAULT,
18614        height_reference: MavOdidHeightRef::DEFAULT,
18615        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
18616        vertical_accuracy: MavOdidVerAcc::DEFAULT,
18617        barometer_accuracy: MavOdidVerAcc::DEFAULT,
18618        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
18619        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
18620    };
18621    #[cfg(feature = "arbitrary")]
18622    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18623        use arbitrary::{Arbitrary, Unstructured};
18624        let mut buf = [0u8; 1024];
18625        rng.fill_bytes(&mut buf);
18626        let mut unstructured = Unstructured::new(&buf);
18627        Self::arbitrary(&mut unstructured).unwrap_or_default()
18628    }
18629}
18630impl Default for OPEN_DRONE_ID_LOCATION_DATA {
18631    fn default() -> Self {
18632        Self::DEFAULT.clone()
18633    }
18634}
18635impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
18636    type Message = MavMessage;
18637    const ID: u32 = 12901u32;
18638    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
18639    const EXTRA_CRC: u8 = 254u8;
18640    const ENCODED_LEN: usize = 59usize;
18641    fn deser(
18642        _version: MavlinkVersion,
18643        __input: &[u8],
18644    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18645        let avail_len = __input.len();
18646        let mut payload_buf = [0; Self::ENCODED_LEN];
18647        let mut buf = if avail_len < Self::ENCODED_LEN {
18648            payload_buf[0..avail_len].copy_from_slice(__input);
18649            Bytes::new(&payload_buf)
18650        } else {
18651            Bytes::new(__input)
18652        };
18653        let mut __struct = Self::default();
18654        __struct.latitude = buf.get_i32_le();
18655        __struct.longitude = buf.get_i32_le();
18656        __struct.altitude_barometric = buf.get_f32_le();
18657        __struct.altitude_geodetic = buf.get_f32_le();
18658        __struct.height = buf.get_f32_le();
18659        __struct.timestamp = buf.get_f32_le();
18660        __struct.direction = buf.get_u16_le();
18661        __struct.speed_horizontal = buf.get_u16_le();
18662        __struct.speed_vertical = buf.get_i16_le();
18663        __struct.target_system = buf.get_u8();
18664        __struct.target_component = buf.get_u8();
18665        for v in &mut __struct.id_or_mac {
18666            let val = buf.get_u8();
18667            *v = val;
18668        }
18669        let tmp = buf.get_u8();
18670        __struct.status =
18671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18672                enum_type: "MavOdidStatus",
18673                value: tmp as u32,
18674            })?;
18675        let tmp = buf.get_u8();
18676        __struct.height_reference =
18677            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18678                enum_type: "MavOdidHeightRef",
18679                value: tmp as u32,
18680            })?;
18681        let tmp = buf.get_u8();
18682        __struct.horizontal_accuracy =
18683            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18684                enum_type: "MavOdidHorAcc",
18685                value: tmp as u32,
18686            })?;
18687        let tmp = buf.get_u8();
18688        __struct.vertical_accuracy =
18689            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18690                enum_type: "MavOdidVerAcc",
18691                value: tmp as u32,
18692            })?;
18693        let tmp = buf.get_u8();
18694        __struct.barometer_accuracy =
18695            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18696                enum_type: "MavOdidVerAcc",
18697                value: tmp as u32,
18698            })?;
18699        let tmp = buf.get_u8();
18700        __struct.speed_accuracy =
18701            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18702                enum_type: "MavOdidSpeedAcc",
18703                value: tmp as u32,
18704            })?;
18705        let tmp = buf.get_u8();
18706        __struct.timestamp_accuracy =
18707            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18708                enum_type: "MavOdidTimeAcc",
18709                value: tmp as u32,
18710            })?;
18711        Ok(__struct)
18712    }
18713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18714        let mut __tmp = BytesMut::new(bytes);
18715        #[allow(clippy::absurd_extreme_comparisons)]
18716        #[allow(unused_comparisons)]
18717        if __tmp.remaining() < Self::ENCODED_LEN {
18718            panic!(
18719                "buffer is too small (need {} bytes, but got {})",
18720                Self::ENCODED_LEN,
18721                __tmp.remaining(),
18722            )
18723        }
18724        __tmp.put_i32_le(self.latitude);
18725        __tmp.put_i32_le(self.longitude);
18726        __tmp.put_f32_le(self.altitude_barometric);
18727        __tmp.put_f32_le(self.altitude_geodetic);
18728        __tmp.put_f32_le(self.height);
18729        __tmp.put_f32_le(self.timestamp);
18730        __tmp.put_u16_le(self.direction);
18731        __tmp.put_u16_le(self.speed_horizontal);
18732        __tmp.put_i16_le(self.speed_vertical);
18733        __tmp.put_u8(self.target_system);
18734        __tmp.put_u8(self.target_component);
18735        for val in &self.id_or_mac {
18736            __tmp.put_u8(*val);
18737        }
18738        __tmp.put_u8(self.status as u8);
18739        __tmp.put_u8(self.height_reference as u8);
18740        __tmp.put_u8(self.horizontal_accuracy as u8);
18741        __tmp.put_u8(self.vertical_accuracy as u8);
18742        __tmp.put_u8(self.barometer_accuracy as u8);
18743        __tmp.put_u8(self.speed_accuracy as u8);
18744        __tmp.put_u8(self.timestamp_accuracy as u8);
18745        if matches!(version, MavlinkVersion::V2) {
18746            let len = __tmp.len();
18747            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18748        } else {
18749            __tmp.len()
18750        }
18751    }
18752}
18753#[doc = "id: 375"]
18754#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
18755#[derive(Debug, Clone, PartialEq)]
18756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18758pub struct ACTUATOR_OUTPUT_STATUS_DATA {
18759    #[doc = "Timestamp (since system boot)."]
18760    pub time_usec: u64,
18761    #[doc = "Active outputs"]
18762    pub active: u32,
18763    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
18764    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18765    pub actuator: [f32; 32],
18766}
18767impl ACTUATOR_OUTPUT_STATUS_DATA {
18768    pub const ENCODED_LEN: usize = 140usize;
18769    pub const DEFAULT: Self = Self {
18770        time_usec: 0_u64,
18771        active: 0_u32,
18772        actuator: [0.0_f32; 32usize],
18773    };
18774    #[cfg(feature = "arbitrary")]
18775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18776        use arbitrary::{Arbitrary, Unstructured};
18777        let mut buf = [0u8; 1024];
18778        rng.fill_bytes(&mut buf);
18779        let mut unstructured = Unstructured::new(&buf);
18780        Self::arbitrary(&mut unstructured).unwrap_or_default()
18781    }
18782}
18783impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
18784    fn default() -> Self {
18785        Self::DEFAULT.clone()
18786    }
18787}
18788impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
18789    type Message = MavMessage;
18790    const ID: u32 = 375u32;
18791    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
18792    const EXTRA_CRC: u8 = 251u8;
18793    const ENCODED_LEN: usize = 140usize;
18794    fn deser(
18795        _version: MavlinkVersion,
18796        __input: &[u8],
18797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18798        let avail_len = __input.len();
18799        let mut payload_buf = [0; Self::ENCODED_LEN];
18800        let mut buf = if avail_len < Self::ENCODED_LEN {
18801            payload_buf[0..avail_len].copy_from_slice(__input);
18802            Bytes::new(&payload_buf)
18803        } else {
18804            Bytes::new(__input)
18805        };
18806        let mut __struct = Self::default();
18807        __struct.time_usec = buf.get_u64_le();
18808        __struct.active = buf.get_u32_le();
18809        for v in &mut __struct.actuator {
18810            let val = buf.get_f32_le();
18811            *v = val;
18812        }
18813        Ok(__struct)
18814    }
18815    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18816        let mut __tmp = BytesMut::new(bytes);
18817        #[allow(clippy::absurd_extreme_comparisons)]
18818        #[allow(unused_comparisons)]
18819        if __tmp.remaining() < Self::ENCODED_LEN {
18820            panic!(
18821                "buffer is too small (need {} bytes, but got {})",
18822                Self::ENCODED_LEN,
18823                __tmp.remaining(),
18824            )
18825        }
18826        __tmp.put_u64_le(self.time_usec);
18827        __tmp.put_u32_le(self.active);
18828        for val in &self.actuator {
18829            __tmp.put_f32_le(*val);
18830        }
18831        if matches!(version, MavlinkVersion::V2) {
18832            let len = __tmp.len();
18833            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18834        } else {
18835            __tmp.len()
18836        }
18837    }
18838}
18839#[doc = "id: 388"]
18840#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
18841#[derive(Debug, Clone, PartialEq)]
18842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18844pub struct CAN_FILTER_MODIFY_DATA {
18845    #[doc = "filter IDs, length num_ids"]
18846    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18847    pub ids: [u16; 16],
18848    #[doc = "System ID."]
18849    pub target_system: u8,
18850    #[doc = "Component ID."]
18851    pub target_component: u8,
18852    #[doc = "bus number"]
18853    pub bus: u8,
18854    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
18855    pub operation: CanFilterOp,
18856    #[doc = "number of IDs in filter list"]
18857    pub num_ids: u8,
18858}
18859impl CAN_FILTER_MODIFY_DATA {
18860    pub const ENCODED_LEN: usize = 37usize;
18861    pub const DEFAULT: Self = Self {
18862        ids: [0_u16; 16usize],
18863        target_system: 0_u8,
18864        target_component: 0_u8,
18865        bus: 0_u8,
18866        operation: CanFilterOp::DEFAULT,
18867        num_ids: 0_u8,
18868    };
18869    #[cfg(feature = "arbitrary")]
18870    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18871        use arbitrary::{Arbitrary, Unstructured};
18872        let mut buf = [0u8; 1024];
18873        rng.fill_bytes(&mut buf);
18874        let mut unstructured = Unstructured::new(&buf);
18875        Self::arbitrary(&mut unstructured).unwrap_or_default()
18876    }
18877}
18878impl Default for CAN_FILTER_MODIFY_DATA {
18879    fn default() -> Self {
18880        Self::DEFAULT.clone()
18881    }
18882}
18883impl MessageData for CAN_FILTER_MODIFY_DATA {
18884    type Message = MavMessage;
18885    const ID: u32 = 388u32;
18886    const NAME: &'static str = "CAN_FILTER_MODIFY";
18887    const EXTRA_CRC: u8 = 8u8;
18888    const ENCODED_LEN: usize = 37usize;
18889    fn deser(
18890        _version: MavlinkVersion,
18891        __input: &[u8],
18892    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18893        let avail_len = __input.len();
18894        let mut payload_buf = [0; Self::ENCODED_LEN];
18895        let mut buf = if avail_len < Self::ENCODED_LEN {
18896            payload_buf[0..avail_len].copy_from_slice(__input);
18897            Bytes::new(&payload_buf)
18898        } else {
18899            Bytes::new(__input)
18900        };
18901        let mut __struct = Self::default();
18902        for v in &mut __struct.ids {
18903            let val = buf.get_u16_le();
18904            *v = val;
18905        }
18906        __struct.target_system = buf.get_u8();
18907        __struct.target_component = buf.get_u8();
18908        __struct.bus = buf.get_u8();
18909        let tmp = buf.get_u8();
18910        __struct.operation =
18911            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18912                enum_type: "CanFilterOp",
18913                value: tmp as u32,
18914            })?;
18915        __struct.num_ids = buf.get_u8();
18916        Ok(__struct)
18917    }
18918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18919        let mut __tmp = BytesMut::new(bytes);
18920        #[allow(clippy::absurd_extreme_comparisons)]
18921        #[allow(unused_comparisons)]
18922        if __tmp.remaining() < Self::ENCODED_LEN {
18923            panic!(
18924                "buffer is too small (need {} bytes, but got {})",
18925                Self::ENCODED_LEN,
18926                __tmp.remaining(),
18927            )
18928        }
18929        for val in &self.ids {
18930            __tmp.put_u16_le(*val);
18931        }
18932        __tmp.put_u8(self.target_system);
18933        __tmp.put_u8(self.target_component);
18934        __tmp.put_u8(self.bus);
18935        __tmp.put_u8(self.operation as u8);
18936        __tmp.put_u8(self.num_ids);
18937        if matches!(version, MavlinkVersion::V2) {
18938            let len = __tmp.len();
18939            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18940        } else {
18941            __tmp.len()
18942        }
18943    }
18944}
18945#[doc = "id: 138"]
18946#[doc = "Motion capture attitude and position."]
18947#[derive(Debug, Clone, PartialEq)]
18948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18950pub struct ATT_POS_MOCAP_DATA {
18951    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18952    pub time_usec: u64,
18953    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18955    pub q: [f32; 4],
18956    #[doc = "X position (NED)"]
18957    pub x: f32,
18958    #[doc = "Y position (NED)"]
18959    pub y: f32,
18960    #[doc = "Z position (NED)"]
18961    pub z: f32,
18962    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
18963    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18964    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18965    pub covariance: [f32; 21],
18966}
18967impl ATT_POS_MOCAP_DATA {
18968    pub const ENCODED_LEN: usize = 120usize;
18969    pub const DEFAULT: Self = Self {
18970        time_usec: 0_u64,
18971        q: [0.0_f32; 4usize],
18972        x: 0.0_f32,
18973        y: 0.0_f32,
18974        z: 0.0_f32,
18975        covariance: [0.0_f32; 21usize],
18976    };
18977    #[cfg(feature = "arbitrary")]
18978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18979        use arbitrary::{Arbitrary, Unstructured};
18980        let mut buf = [0u8; 1024];
18981        rng.fill_bytes(&mut buf);
18982        let mut unstructured = Unstructured::new(&buf);
18983        Self::arbitrary(&mut unstructured).unwrap_or_default()
18984    }
18985}
18986impl Default for ATT_POS_MOCAP_DATA {
18987    fn default() -> Self {
18988        Self::DEFAULT.clone()
18989    }
18990}
18991impl MessageData for ATT_POS_MOCAP_DATA {
18992    type Message = MavMessage;
18993    const ID: u32 = 138u32;
18994    const NAME: &'static str = "ATT_POS_MOCAP";
18995    const EXTRA_CRC: u8 = 109u8;
18996    const ENCODED_LEN: usize = 120usize;
18997    fn deser(
18998        _version: MavlinkVersion,
18999        __input: &[u8],
19000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19001        let avail_len = __input.len();
19002        let mut payload_buf = [0; Self::ENCODED_LEN];
19003        let mut buf = if avail_len < Self::ENCODED_LEN {
19004            payload_buf[0..avail_len].copy_from_slice(__input);
19005            Bytes::new(&payload_buf)
19006        } else {
19007            Bytes::new(__input)
19008        };
19009        let mut __struct = Self::default();
19010        __struct.time_usec = buf.get_u64_le();
19011        for v in &mut __struct.q {
19012            let val = buf.get_f32_le();
19013            *v = val;
19014        }
19015        __struct.x = buf.get_f32_le();
19016        __struct.y = buf.get_f32_le();
19017        __struct.z = buf.get_f32_le();
19018        for v in &mut __struct.covariance {
19019            let val = buf.get_f32_le();
19020            *v = val;
19021        }
19022        Ok(__struct)
19023    }
19024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19025        let mut __tmp = BytesMut::new(bytes);
19026        #[allow(clippy::absurd_extreme_comparisons)]
19027        #[allow(unused_comparisons)]
19028        if __tmp.remaining() < Self::ENCODED_LEN {
19029            panic!(
19030                "buffer is too small (need {} bytes, but got {})",
19031                Self::ENCODED_LEN,
19032                __tmp.remaining(),
19033            )
19034        }
19035        __tmp.put_u64_le(self.time_usec);
19036        for val in &self.q {
19037            __tmp.put_f32_le(*val);
19038        }
19039        __tmp.put_f32_le(self.x);
19040        __tmp.put_f32_le(self.y);
19041        __tmp.put_f32_le(self.z);
19042        for val in &self.covariance {
19043            __tmp.put_f32_le(*val);
19044        }
19045        if matches!(version, MavlinkVersion::V2) {
19046            let len = __tmp.len();
19047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19048        } else {
19049            __tmp.len()
19050        }
19051    }
19052}
19053#[doc = "id: 4"]
19054#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
19055#[derive(Debug, Clone, PartialEq)]
19056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19058pub struct PING_DATA {
19059    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19060    pub time_usec: u64,
19061    #[doc = "PING sequence"]
19062    pub seq: u32,
19063    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
19064    pub target_system: u8,
19065    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
19066    pub target_component: u8,
19067}
19068impl PING_DATA {
19069    pub const ENCODED_LEN: usize = 14usize;
19070    pub const DEFAULT: Self = Self {
19071        time_usec: 0_u64,
19072        seq: 0_u32,
19073        target_system: 0_u8,
19074        target_component: 0_u8,
19075    };
19076    #[cfg(feature = "arbitrary")]
19077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19078        use arbitrary::{Arbitrary, Unstructured};
19079        let mut buf = [0u8; 1024];
19080        rng.fill_bytes(&mut buf);
19081        let mut unstructured = Unstructured::new(&buf);
19082        Self::arbitrary(&mut unstructured).unwrap_or_default()
19083    }
19084}
19085impl Default for PING_DATA {
19086    fn default() -> Self {
19087        Self::DEFAULT.clone()
19088    }
19089}
19090impl MessageData for PING_DATA {
19091    type Message = MavMessage;
19092    const ID: u32 = 4u32;
19093    const NAME: &'static str = "PING";
19094    const EXTRA_CRC: u8 = 237u8;
19095    const ENCODED_LEN: usize = 14usize;
19096    fn deser(
19097        _version: MavlinkVersion,
19098        __input: &[u8],
19099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19100        let avail_len = __input.len();
19101        let mut payload_buf = [0; Self::ENCODED_LEN];
19102        let mut buf = if avail_len < Self::ENCODED_LEN {
19103            payload_buf[0..avail_len].copy_from_slice(__input);
19104            Bytes::new(&payload_buf)
19105        } else {
19106            Bytes::new(__input)
19107        };
19108        let mut __struct = Self::default();
19109        __struct.time_usec = buf.get_u64_le();
19110        __struct.seq = buf.get_u32_le();
19111        __struct.target_system = buf.get_u8();
19112        __struct.target_component = buf.get_u8();
19113        Ok(__struct)
19114    }
19115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19116        let mut __tmp = BytesMut::new(bytes);
19117        #[allow(clippy::absurd_extreme_comparisons)]
19118        #[allow(unused_comparisons)]
19119        if __tmp.remaining() < Self::ENCODED_LEN {
19120            panic!(
19121                "buffer is too small (need {} bytes, but got {})",
19122                Self::ENCODED_LEN,
19123                __tmp.remaining(),
19124            )
19125        }
19126        __tmp.put_u64_le(self.time_usec);
19127        __tmp.put_u32_le(self.seq);
19128        __tmp.put_u8(self.target_system);
19129        __tmp.put_u8(self.target_component);
19130        if matches!(version, MavlinkVersion::V2) {
19131            let len = __tmp.len();
19132            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19133        } else {
19134            __tmp.len()
19135        }
19136    }
19137}
19138#[doc = "id: 9005"]
19139#[doc = "Winch status."]
19140#[derive(Debug, Clone, PartialEq)]
19141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19143pub struct WINCH_STATUS_DATA {
19144    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
19145    pub time_usec: u64,
19146    #[doc = "Length of line released. NaN if unknown"]
19147    pub line_length: f32,
19148    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
19149    pub speed: f32,
19150    #[doc = "Tension on the line. NaN if unknown"]
19151    pub tension: f32,
19152    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
19153    pub voltage: f32,
19154    #[doc = "Current draw from the winch. NaN if unknown"]
19155    pub current: f32,
19156    #[doc = "Status flags"]
19157    pub status: MavWinchStatusFlag,
19158    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
19159    pub temperature: i16,
19160}
19161impl WINCH_STATUS_DATA {
19162    pub const ENCODED_LEN: usize = 34usize;
19163    pub const DEFAULT: Self = Self {
19164        time_usec: 0_u64,
19165        line_length: 0.0_f32,
19166        speed: 0.0_f32,
19167        tension: 0.0_f32,
19168        voltage: 0.0_f32,
19169        current: 0.0_f32,
19170        status: MavWinchStatusFlag::DEFAULT,
19171        temperature: 0_i16,
19172    };
19173    #[cfg(feature = "arbitrary")]
19174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19175        use arbitrary::{Arbitrary, Unstructured};
19176        let mut buf = [0u8; 1024];
19177        rng.fill_bytes(&mut buf);
19178        let mut unstructured = Unstructured::new(&buf);
19179        Self::arbitrary(&mut unstructured).unwrap_or_default()
19180    }
19181}
19182impl Default for WINCH_STATUS_DATA {
19183    fn default() -> Self {
19184        Self::DEFAULT.clone()
19185    }
19186}
19187impl MessageData for WINCH_STATUS_DATA {
19188    type Message = MavMessage;
19189    const ID: u32 = 9005u32;
19190    const NAME: &'static str = "WINCH_STATUS";
19191    const EXTRA_CRC: u8 = 117u8;
19192    const ENCODED_LEN: usize = 34usize;
19193    fn deser(
19194        _version: MavlinkVersion,
19195        __input: &[u8],
19196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19197        let avail_len = __input.len();
19198        let mut payload_buf = [0; Self::ENCODED_LEN];
19199        let mut buf = if avail_len < Self::ENCODED_LEN {
19200            payload_buf[0..avail_len].copy_from_slice(__input);
19201            Bytes::new(&payload_buf)
19202        } else {
19203            Bytes::new(__input)
19204        };
19205        let mut __struct = Self::default();
19206        __struct.time_usec = buf.get_u64_le();
19207        __struct.line_length = buf.get_f32_le();
19208        __struct.speed = buf.get_f32_le();
19209        __struct.tension = buf.get_f32_le();
19210        __struct.voltage = buf.get_f32_le();
19211        __struct.current = buf.get_f32_le();
19212        let tmp = buf.get_u32_le();
19213        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
19214            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
19215                flag_type: "MavWinchStatusFlag",
19216                value: tmp as u32,
19217            })?;
19218        __struct.temperature = buf.get_i16_le();
19219        Ok(__struct)
19220    }
19221    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19222        let mut __tmp = BytesMut::new(bytes);
19223        #[allow(clippy::absurd_extreme_comparisons)]
19224        #[allow(unused_comparisons)]
19225        if __tmp.remaining() < Self::ENCODED_LEN {
19226            panic!(
19227                "buffer is too small (need {} bytes, but got {})",
19228                Self::ENCODED_LEN,
19229                __tmp.remaining(),
19230            )
19231        }
19232        __tmp.put_u64_le(self.time_usec);
19233        __tmp.put_f32_le(self.line_length);
19234        __tmp.put_f32_le(self.speed);
19235        __tmp.put_f32_le(self.tension);
19236        __tmp.put_f32_le(self.voltage);
19237        __tmp.put_f32_le(self.current);
19238        __tmp.put_u32_le(self.status.bits());
19239        __tmp.put_i16_le(self.temperature);
19240        if matches!(version, MavlinkVersion::V2) {
19241            let len = __tmp.len();
19242            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19243        } else {
19244            __tmp.len()
19245        }
19246    }
19247}
19248#[doc = "id: 264"]
19249#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
19250#[derive(Debug, Clone, PartialEq)]
19251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19252#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19253pub struct FLIGHT_INFORMATION_DATA {
19254    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
19255    pub arming_time_utc: u64,
19256    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
19257    pub takeoff_time_utc: u64,
19258    #[doc = "Flight number. Note, field is misnamed UUID."]
19259    pub flight_uuid: u64,
19260    #[doc = "Timestamp (time since system boot)."]
19261    pub time_boot_ms: u32,
19262    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
19263    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19264    pub landing_time: u32,
19265}
19266impl FLIGHT_INFORMATION_DATA {
19267    pub const ENCODED_LEN: usize = 32usize;
19268    pub const DEFAULT: Self = Self {
19269        arming_time_utc: 0_u64,
19270        takeoff_time_utc: 0_u64,
19271        flight_uuid: 0_u64,
19272        time_boot_ms: 0_u32,
19273        landing_time: 0_u32,
19274    };
19275    #[cfg(feature = "arbitrary")]
19276    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19277        use arbitrary::{Arbitrary, Unstructured};
19278        let mut buf = [0u8; 1024];
19279        rng.fill_bytes(&mut buf);
19280        let mut unstructured = Unstructured::new(&buf);
19281        Self::arbitrary(&mut unstructured).unwrap_or_default()
19282    }
19283}
19284impl Default for FLIGHT_INFORMATION_DATA {
19285    fn default() -> Self {
19286        Self::DEFAULT.clone()
19287    }
19288}
19289impl MessageData for FLIGHT_INFORMATION_DATA {
19290    type Message = MavMessage;
19291    const ID: u32 = 264u32;
19292    const NAME: &'static str = "FLIGHT_INFORMATION";
19293    const EXTRA_CRC: u8 = 49u8;
19294    const ENCODED_LEN: usize = 32usize;
19295    fn deser(
19296        _version: MavlinkVersion,
19297        __input: &[u8],
19298    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19299        let avail_len = __input.len();
19300        let mut payload_buf = [0; Self::ENCODED_LEN];
19301        let mut buf = if avail_len < Self::ENCODED_LEN {
19302            payload_buf[0..avail_len].copy_from_slice(__input);
19303            Bytes::new(&payload_buf)
19304        } else {
19305            Bytes::new(__input)
19306        };
19307        let mut __struct = Self::default();
19308        __struct.arming_time_utc = buf.get_u64_le();
19309        __struct.takeoff_time_utc = buf.get_u64_le();
19310        __struct.flight_uuid = buf.get_u64_le();
19311        __struct.time_boot_ms = buf.get_u32_le();
19312        __struct.landing_time = buf.get_u32_le();
19313        Ok(__struct)
19314    }
19315    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19316        let mut __tmp = BytesMut::new(bytes);
19317        #[allow(clippy::absurd_extreme_comparisons)]
19318        #[allow(unused_comparisons)]
19319        if __tmp.remaining() < Self::ENCODED_LEN {
19320            panic!(
19321                "buffer is too small (need {} bytes, but got {})",
19322                Self::ENCODED_LEN,
19323                __tmp.remaining(),
19324            )
19325        }
19326        __tmp.put_u64_le(self.arming_time_utc);
19327        __tmp.put_u64_le(self.takeoff_time_utc);
19328        __tmp.put_u64_le(self.flight_uuid);
19329        __tmp.put_u32_le(self.time_boot_ms);
19330        __tmp.put_u32_le(self.landing_time);
19331        if matches!(version, MavlinkVersion::V2) {
19332            let len = __tmp.len();
19333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19334        } else {
19335            __tmp.len()
19336        }
19337    }
19338}
19339#[doc = "id: 130"]
19340#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
19341#[derive(Debug, Clone, PartialEq)]
19342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19344pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
19345    #[doc = "total data size (set on ACK only)."]
19346    pub size: u32,
19347    #[doc = "Width of a matrix or image."]
19348    pub width: u16,
19349    #[doc = "Height of a matrix or image."]
19350    pub height: u16,
19351    #[doc = "Number of packets being sent (set on ACK only)."]
19352    pub packets: u16,
19353    #[doc = "Type of requested/acknowledged data."]
19354    pub mavtype: MavlinkDataStreamType,
19355    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
19356    pub payload: u8,
19357    #[doc = "JPEG quality. Values: [1-100]."]
19358    pub jpg_quality: u8,
19359}
19360impl DATA_TRANSMISSION_HANDSHAKE_DATA {
19361    pub const ENCODED_LEN: usize = 13usize;
19362    pub const DEFAULT: Self = Self {
19363        size: 0_u32,
19364        width: 0_u16,
19365        height: 0_u16,
19366        packets: 0_u16,
19367        mavtype: MavlinkDataStreamType::DEFAULT,
19368        payload: 0_u8,
19369        jpg_quality: 0_u8,
19370    };
19371    #[cfg(feature = "arbitrary")]
19372    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19373        use arbitrary::{Arbitrary, Unstructured};
19374        let mut buf = [0u8; 1024];
19375        rng.fill_bytes(&mut buf);
19376        let mut unstructured = Unstructured::new(&buf);
19377        Self::arbitrary(&mut unstructured).unwrap_or_default()
19378    }
19379}
19380impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
19381    fn default() -> Self {
19382        Self::DEFAULT.clone()
19383    }
19384}
19385impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
19386    type Message = MavMessage;
19387    const ID: u32 = 130u32;
19388    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
19389    const EXTRA_CRC: u8 = 29u8;
19390    const ENCODED_LEN: usize = 13usize;
19391    fn deser(
19392        _version: MavlinkVersion,
19393        __input: &[u8],
19394    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19395        let avail_len = __input.len();
19396        let mut payload_buf = [0; Self::ENCODED_LEN];
19397        let mut buf = if avail_len < Self::ENCODED_LEN {
19398            payload_buf[0..avail_len].copy_from_slice(__input);
19399            Bytes::new(&payload_buf)
19400        } else {
19401            Bytes::new(__input)
19402        };
19403        let mut __struct = Self::default();
19404        __struct.size = buf.get_u32_le();
19405        __struct.width = buf.get_u16_le();
19406        __struct.height = buf.get_u16_le();
19407        __struct.packets = buf.get_u16_le();
19408        let tmp = buf.get_u8();
19409        __struct.mavtype =
19410            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19411                enum_type: "MavlinkDataStreamType",
19412                value: tmp as u32,
19413            })?;
19414        __struct.payload = buf.get_u8();
19415        __struct.jpg_quality = buf.get_u8();
19416        Ok(__struct)
19417    }
19418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19419        let mut __tmp = BytesMut::new(bytes);
19420        #[allow(clippy::absurd_extreme_comparisons)]
19421        #[allow(unused_comparisons)]
19422        if __tmp.remaining() < Self::ENCODED_LEN {
19423            panic!(
19424                "buffer is too small (need {} bytes, but got {})",
19425                Self::ENCODED_LEN,
19426                __tmp.remaining(),
19427            )
19428        }
19429        __tmp.put_u32_le(self.size);
19430        __tmp.put_u16_le(self.width);
19431        __tmp.put_u16_le(self.height);
19432        __tmp.put_u16_le(self.packets);
19433        __tmp.put_u8(self.mavtype as u8);
19434        __tmp.put_u8(self.payload);
19435        __tmp.put_u8(self.jpg_quality);
19436        if matches!(version, MavlinkVersion::V2) {
19437            let len = __tmp.len();
19438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19439        } else {
19440            __tmp.len()
19441        }
19442    }
19443}
19444#[doc = "id: 73"]
19445#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19446#[derive(Debug, Clone, PartialEq)]
19447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19449pub struct MISSION_ITEM_INT_DATA {
19450    #[doc = "PARAM1, see MAV_CMD enum"]
19451    pub param1: f32,
19452    #[doc = "PARAM2, see MAV_CMD enum"]
19453    pub param2: f32,
19454    #[doc = "PARAM3, see MAV_CMD enum"]
19455    pub param3: f32,
19456    #[doc = "PARAM4, see MAV_CMD enum"]
19457    pub param4: f32,
19458    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19459    pub x: i32,
19460    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19461    pub y: i32,
19462    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19463    pub z: f32,
19464    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19465    pub seq: u16,
19466    #[doc = "The scheduled action for the waypoint."]
19467    pub command: MavCmd,
19468    #[doc = "System ID"]
19469    pub target_system: u8,
19470    #[doc = "Component ID"]
19471    pub target_component: u8,
19472    #[doc = "The coordinate system of the waypoint."]
19473    pub frame: MavFrame,
19474    #[doc = "false:0, true:1"]
19475    pub current: u8,
19476    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19477    pub autocontinue: u8,
19478    #[doc = "Mission type."]
19479    #[cfg_attr(feature = "serde", serde(default))]
19480    pub mission_type: MavMissionType,
19481}
19482impl MISSION_ITEM_INT_DATA {
19483    pub const ENCODED_LEN: usize = 38usize;
19484    pub const DEFAULT: Self = Self {
19485        param1: 0.0_f32,
19486        param2: 0.0_f32,
19487        param3: 0.0_f32,
19488        param4: 0.0_f32,
19489        x: 0_i32,
19490        y: 0_i32,
19491        z: 0.0_f32,
19492        seq: 0_u16,
19493        command: MavCmd::DEFAULT,
19494        target_system: 0_u8,
19495        target_component: 0_u8,
19496        frame: MavFrame::DEFAULT,
19497        current: 0_u8,
19498        autocontinue: 0_u8,
19499        mission_type: MavMissionType::DEFAULT,
19500    };
19501    #[cfg(feature = "arbitrary")]
19502    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19503        use arbitrary::{Arbitrary, Unstructured};
19504        let mut buf = [0u8; 1024];
19505        rng.fill_bytes(&mut buf);
19506        let mut unstructured = Unstructured::new(&buf);
19507        Self::arbitrary(&mut unstructured).unwrap_or_default()
19508    }
19509}
19510impl Default for MISSION_ITEM_INT_DATA {
19511    fn default() -> Self {
19512        Self::DEFAULT.clone()
19513    }
19514}
19515impl MessageData for MISSION_ITEM_INT_DATA {
19516    type Message = MavMessage;
19517    const ID: u32 = 73u32;
19518    const NAME: &'static str = "MISSION_ITEM_INT";
19519    const EXTRA_CRC: u8 = 38u8;
19520    const ENCODED_LEN: usize = 38usize;
19521    fn deser(
19522        _version: MavlinkVersion,
19523        __input: &[u8],
19524    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19525        let avail_len = __input.len();
19526        let mut payload_buf = [0; Self::ENCODED_LEN];
19527        let mut buf = if avail_len < Self::ENCODED_LEN {
19528            payload_buf[0..avail_len].copy_from_slice(__input);
19529            Bytes::new(&payload_buf)
19530        } else {
19531            Bytes::new(__input)
19532        };
19533        let mut __struct = Self::default();
19534        __struct.param1 = buf.get_f32_le();
19535        __struct.param2 = buf.get_f32_le();
19536        __struct.param3 = buf.get_f32_le();
19537        __struct.param4 = buf.get_f32_le();
19538        __struct.x = buf.get_i32_le();
19539        __struct.y = buf.get_i32_le();
19540        __struct.z = buf.get_f32_le();
19541        __struct.seq = buf.get_u16_le();
19542        let tmp = buf.get_u16_le();
19543        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19544            ::mavlink_core::error::ParserError::InvalidEnum {
19545                enum_type: "MavCmd",
19546                value: tmp as u32,
19547            },
19548        )?;
19549        __struct.target_system = buf.get_u8();
19550        __struct.target_component = buf.get_u8();
19551        let tmp = buf.get_u8();
19552        __struct.frame =
19553            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19554                enum_type: "MavFrame",
19555                value: tmp as u32,
19556            })?;
19557        __struct.current = buf.get_u8();
19558        __struct.autocontinue = buf.get_u8();
19559        let tmp = buf.get_u8();
19560        __struct.mission_type =
19561            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19562                enum_type: "MavMissionType",
19563                value: tmp as u32,
19564            })?;
19565        Ok(__struct)
19566    }
19567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19568        let mut __tmp = BytesMut::new(bytes);
19569        #[allow(clippy::absurd_extreme_comparisons)]
19570        #[allow(unused_comparisons)]
19571        if __tmp.remaining() < Self::ENCODED_LEN {
19572            panic!(
19573                "buffer is too small (need {} bytes, but got {})",
19574                Self::ENCODED_LEN,
19575                __tmp.remaining(),
19576            )
19577        }
19578        __tmp.put_f32_le(self.param1);
19579        __tmp.put_f32_le(self.param2);
19580        __tmp.put_f32_le(self.param3);
19581        __tmp.put_f32_le(self.param4);
19582        __tmp.put_i32_le(self.x);
19583        __tmp.put_i32_le(self.y);
19584        __tmp.put_f32_le(self.z);
19585        __tmp.put_u16_le(self.seq);
19586        __tmp.put_u16_le(self.command as u16);
19587        __tmp.put_u8(self.target_system);
19588        __tmp.put_u8(self.target_component);
19589        __tmp.put_u8(self.frame as u8);
19590        __tmp.put_u8(self.current);
19591        __tmp.put_u8(self.autocontinue);
19592        __tmp.put_u8(self.mission_type as u8);
19593        if matches!(version, MavlinkVersion::V2) {
19594            let len = __tmp.len();
19595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19596        } else {
19597            __tmp.len()
19598        }
19599    }
19600}
19601#[doc = "id: 31"]
19602#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
19603#[derive(Debug, Clone, PartialEq)]
19604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19606pub struct ATTITUDE_QUATERNION_DATA {
19607    #[doc = "Timestamp (time since system boot)."]
19608    pub time_boot_ms: u32,
19609    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
19610    pub q1: f32,
19611    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
19612    pub q2: f32,
19613    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
19614    pub q3: f32,
19615    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
19616    pub q4: f32,
19617    #[doc = "Roll angular speed"]
19618    pub rollspeed: f32,
19619    #[doc = "Pitch angular speed"]
19620    pub pitchspeed: f32,
19621    #[doc = "Yaw angular speed"]
19622    pub yawspeed: f32,
19623    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
19624    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19625    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19626    pub repr_offset_q: [f32; 4],
19627}
19628impl ATTITUDE_QUATERNION_DATA {
19629    pub const ENCODED_LEN: usize = 48usize;
19630    pub const DEFAULT: Self = Self {
19631        time_boot_ms: 0_u32,
19632        q1: 0.0_f32,
19633        q2: 0.0_f32,
19634        q3: 0.0_f32,
19635        q4: 0.0_f32,
19636        rollspeed: 0.0_f32,
19637        pitchspeed: 0.0_f32,
19638        yawspeed: 0.0_f32,
19639        repr_offset_q: [0.0_f32; 4usize],
19640    };
19641    #[cfg(feature = "arbitrary")]
19642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19643        use arbitrary::{Arbitrary, Unstructured};
19644        let mut buf = [0u8; 1024];
19645        rng.fill_bytes(&mut buf);
19646        let mut unstructured = Unstructured::new(&buf);
19647        Self::arbitrary(&mut unstructured).unwrap_or_default()
19648    }
19649}
19650impl Default for ATTITUDE_QUATERNION_DATA {
19651    fn default() -> Self {
19652        Self::DEFAULT.clone()
19653    }
19654}
19655impl MessageData for ATTITUDE_QUATERNION_DATA {
19656    type Message = MavMessage;
19657    const ID: u32 = 31u32;
19658    const NAME: &'static str = "ATTITUDE_QUATERNION";
19659    const EXTRA_CRC: u8 = 246u8;
19660    const ENCODED_LEN: usize = 48usize;
19661    fn deser(
19662        _version: MavlinkVersion,
19663        __input: &[u8],
19664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19665        let avail_len = __input.len();
19666        let mut payload_buf = [0; Self::ENCODED_LEN];
19667        let mut buf = if avail_len < Self::ENCODED_LEN {
19668            payload_buf[0..avail_len].copy_from_slice(__input);
19669            Bytes::new(&payload_buf)
19670        } else {
19671            Bytes::new(__input)
19672        };
19673        let mut __struct = Self::default();
19674        __struct.time_boot_ms = buf.get_u32_le();
19675        __struct.q1 = buf.get_f32_le();
19676        __struct.q2 = buf.get_f32_le();
19677        __struct.q3 = buf.get_f32_le();
19678        __struct.q4 = buf.get_f32_le();
19679        __struct.rollspeed = buf.get_f32_le();
19680        __struct.pitchspeed = buf.get_f32_le();
19681        __struct.yawspeed = buf.get_f32_le();
19682        for v in &mut __struct.repr_offset_q {
19683            let val = buf.get_f32_le();
19684            *v = val;
19685        }
19686        Ok(__struct)
19687    }
19688    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19689        let mut __tmp = BytesMut::new(bytes);
19690        #[allow(clippy::absurd_extreme_comparisons)]
19691        #[allow(unused_comparisons)]
19692        if __tmp.remaining() < Self::ENCODED_LEN {
19693            panic!(
19694                "buffer is too small (need {} bytes, but got {})",
19695                Self::ENCODED_LEN,
19696                __tmp.remaining(),
19697            )
19698        }
19699        __tmp.put_u32_le(self.time_boot_ms);
19700        __tmp.put_f32_le(self.q1);
19701        __tmp.put_f32_le(self.q2);
19702        __tmp.put_f32_le(self.q3);
19703        __tmp.put_f32_le(self.q4);
19704        __tmp.put_f32_le(self.rollspeed);
19705        __tmp.put_f32_le(self.pitchspeed);
19706        __tmp.put_f32_le(self.yawspeed);
19707        for val in &self.repr_offset_q {
19708            __tmp.put_f32_le(*val);
19709        }
19710        if matches!(version, MavlinkVersion::V2) {
19711            let len = __tmp.len();
19712            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19713        } else {
19714            __tmp.len()
19715        }
19716    }
19717}
19718#[doc = "id: 282"]
19719#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
19720#[derive(Debug, Clone, PartialEq)]
19721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19723pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
19724    #[doc = "High level gimbal manager flags to use."]
19725    pub flags: GimbalManagerFlags,
19726    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
19727    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19728    pub q: [f32; 4],
19729    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
19730    pub angular_velocity_x: f32,
19731    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
19732    pub angular_velocity_y: f32,
19733    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
19734    pub angular_velocity_z: f32,
19735    #[doc = "System ID"]
19736    pub target_system: u8,
19737    #[doc = "Component ID"]
19738    pub target_component: u8,
19739    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
19740    pub gimbal_device_id: u8,
19741}
19742impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
19743    pub const ENCODED_LEN: usize = 35usize;
19744    pub const DEFAULT: Self = Self {
19745        flags: GimbalManagerFlags::DEFAULT,
19746        q: [0.0_f32; 4usize],
19747        angular_velocity_x: 0.0_f32,
19748        angular_velocity_y: 0.0_f32,
19749        angular_velocity_z: 0.0_f32,
19750        target_system: 0_u8,
19751        target_component: 0_u8,
19752        gimbal_device_id: 0_u8,
19753    };
19754    #[cfg(feature = "arbitrary")]
19755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19756        use arbitrary::{Arbitrary, Unstructured};
19757        let mut buf = [0u8; 1024];
19758        rng.fill_bytes(&mut buf);
19759        let mut unstructured = Unstructured::new(&buf);
19760        Self::arbitrary(&mut unstructured).unwrap_or_default()
19761    }
19762}
19763impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
19764    fn default() -> Self {
19765        Self::DEFAULT.clone()
19766    }
19767}
19768impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
19769    type Message = MavMessage;
19770    const ID: u32 = 282u32;
19771    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
19772    const EXTRA_CRC: u8 = 123u8;
19773    const ENCODED_LEN: usize = 35usize;
19774    fn deser(
19775        _version: MavlinkVersion,
19776        __input: &[u8],
19777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19778        let avail_len = __input.len();
19779        let mut payload_buf = [0; Self::ENCODED_LEN];
19780        let mut buf = if avail_len < Self::ENCODED_LEN {
19781            payload_buf[0..avail_len].copy_from_slice(__input);
19782            Bytes::new(&payload_buf)
19783        } else {
19784            Bytes::new(__input)
19785        };
19786        let mut __struct = Self::default();
19787        let tmp = buf.get_u32_le();
19788        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
19789            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
19790                flag_type: "GimbalManagerFlags",
19791                value: tmp as u32,
19792            })?;
19793        for v in &mut __struct.q {
19794            let val = buf.get_f32_le();
19795            *v = val;
19796        }
19797        __struct.angular_velocity_x = buf.get_f32_le();
19798        __struct.angular_velocity_y = buf.get_f32_le();
19799        __struct.angular_velocity_z = buf.get_f32_le();
19800        __struct.target_system = buf.get_u8();
19801        __struct.target_component = buf.get_u8();
19802        __struct.gimbal_device_id = buf.get_u8();
19803        Ok(__struct)
19804    }
19805    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19806        let mut __tmp = BytesMut::new(bytes);
19807        #[allow(clippy::absurd_extreme_comparisons)]
19808        #[allow(unused_comparisons)]
19809        if __tmp.remaining() < Self::ENCODED_LEN {
19810            panic!(
19811                "buffer is too small (need {} bytes, but got {})",
19812                Self::ENCODED_LEN,
19813                __tmp.remaining(),
19814            )
19815        }
19816        __tmp.put_u32_le(self.flags.bits());
19817        for val in &self.q {
19818            __tmp.put_f32_le(*val);
19819        }
19820        __tmp.put_f32_le(self.angular_velocity_x);
19821        __tmp.put_f32_le(self.angular_velocity_y);
19822        __tmp.put_f32_le(self.angular_velocity_z);
19823        __tmp.put_u8(self.target_system);
19824        __tmp.put_u8(self.target_component);
19825        __tmp.put_u8(self.gimbal_device_id);
19826        if matches!(version, MavlinkVersion::V2) {
19827            let len = __tmp.len();
19828            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19829        } else {
19830            __tmp.len()
19831        }
19832    }
19833}
19834#[doc = "id: 28"]
19835#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
19836#[derive(Debug, Clone, PartialEq)]
19837#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19839pub struct RAW_PRESSURE_DATA {
19840    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19841    pub time_usec: u64,
19842    #[doc = "Absolute pressure (raw)"]
19843    pub press_abs: i16,
19844    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
19845    pub press_diff1: i16,
19846    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
19847    pub press_diff2: i16,
19848    #[doc = "Raw Temperature measurement (raw)"]
19849    pub temperature: i16,
19850}
19851impl RAW_PRESSURE_DATA {
19852    pub const ENCODED_LEN: usize = 16usize;
19853    pub const DEFAULT: Self = Self {
19854        time_usec: 0_u64,
19855        press_abs: 0_i16,
19856        press_diff1: 0_i16,
19857        press_diff2: 0_i16,
19858        temperature: 0_i16,
19859    };
19860    #[cfg(feature = "arbitrary")]
19861    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19862        use arbitrary::{Arbitrary, Unstructured};
19863        let mut buf = [0u8; 1024];
19864        rng.fill_bytes(&mut buf);
19865        let mut unstructured = Unstructured::new(&buf);
19866        Self::arbitrary(&mut unstructured).unwrap_or_default()
19867    }
19868}
19869impl Default for RAW_PRESSURE_DATA {
19870    fn default() -> Self {
19871        Self::DEFAULT.clone()
19872    }
19873}
19874impl MessageData for RAW_PRESSURE_DATA {
19875    type Message = MavMessage;
19876    const ID: u32 = 28u32;
19877    const NAME: &'static str = "RAW_PRESSURE";
19878    const EXTRA_CRC: u8 = 67u8;
19879    const ENCODED_LEN: usize = 16usize;
19880    fn deser(
19881        _version: MavlinkVersion,
19882        __input: &[u8],
19883    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19884        let avail_len = __input.len();
19885        let mut payload_buf = [0; Self::ENCODED_LEN];
19886        let mut buf = if avail_len < Self::ENCODED_LEN {
19887            payload_buf[0..avail_len].copy_from_slice(__input);
19888            Bytes::new(&payload_buf)
19889        } else {
19890            Bytes::new(__input)
19891        };
19892        let mut __struct = Self::default();
19893        __struct.time_usec = buf.get_u64_le();
19894        __struct.press_abs = buf.get_i16_le();
19895        __struct.press_diff1 = buf.get_i16_le();
19896        __struct.press_diff2 = buf.get_i16_le();
19897        __struct.temperature = buf.get_i16_le();
19898        Ok(__struct)
19899    }
19900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19901        let mut __tmp = BytesMut::new(bytes);
19902        #[allow(clippy::absurd_extreme_comparisons)]
19903        #[allow(unused_comparisons)]
19904        if __tmp.remaining() < Self::ENCODED_LEN {
19905            panic!(
19906                "buffer is too small (need {} bytes, but got {})",
19907                Self::ENCODED_LEN,
19908                __tmp.remaining(),
19909            )
19910        }
19911        __tmp.put_u64_le(self.time_usec);
19912        __tmp.put_i16_le(self.press_abs);
19913        __tmp.put_i16_le(self.press_diff1);
19914        __tmp.put_i16_le(self.press_diff2);
19915        __tmp.put_i16_le(self.temperature);
19916        if matches!(version, MavlinkVersion::V2) {
19917            let len = __tmp.len();
19918            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19919        } else {
19920            __tmp.len()
19921        }
19922    }
19923}
19924#[doc = "id: 275"]
19925#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
19926#[derive(Debug, Clone, PartialEq)]
19927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19929pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
19930    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
19931    pub point_x: f32,
19932    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
19933    pub point_y: f32,
19934    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
19935    pub radius: f32,
19936    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
19937    pub rec_top_x: f32,
19938    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
19939    pub rec_top_y: f32,
19940    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
19941    pub rec_bottom_x: f32,
19942    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
19943    pub rec_bottom_y: f32,
19944    #[doc = "Current tracking status"]
19945    pub tracking_status: CameraTrackingStatusFlags,
19946    #[doc = "Current tracking mode"]
19947    pub tracking_mode: CameraTrackingMode,
19948    #[doc = "Defines location of target data"]
19949    pub target_data: CameraTrackingTargetData,
19950    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
19951    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19952    pub camera_device_id: u8,
19953}
19954impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
19955    pub const ENCODED_LEN: usize = 32usize;
19956    pub const DEFAULT: Self = Self {
19957        point_x: 0.0_f32,
19958        point_y: 0.0_f32,
19959        radius: 0.0_f32,
19960        rec_top_x: 0.0_f32,
19961        rec_top_y: 0.0_f32,
19962        rec_bottom_x: 0.0_f32,
19963        rec_bottom_y: 0.0_f32,
19964        tracking_status: CameraTrackingStatusFlags::DEFAULT,
19965        tracking_mode: CameraTrackingMode::DEFAULT,
19966        target_data: CameraTrackingTargetData::DEFAULT,
19967        camera_device_id: 0_u8,
19968    };
19969    #[cfg(feature = "arbitrary")]
19970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19971        use arbitrary::{Arbitrary, Unstructured};
19972        let mut buf = [0u8; 1024];
19973        rng.fill_bytes(&mut buf);
19974        let mut unstructured = Unstructured::new(&buf);
19975        Self::arbitrary(&mut unstructured).unwrap_or_default()
19976    }
19977}
19978impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
19979    fn default() -> Self {
19980        Self::DEFAULT.clone()
19981    }
19982}
19983impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
19984    type Message = MavMessage;
19985    const ID: u32 = 275u32;
19986    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
19987    const EXTRA_CRC: u8 = 126u8;
19988    const ENCODED_LEN: usize = 32usize;
19989    fn deser(
19990        _version: MavlinkVersion,
19991        __input: &[u8],
19992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19993        let avail_len = __input.len();
19994        let mut payload_buf = [0; Self::ENCODED_LEN];
19995        let mut buf = if avail_len < Self::ENCODED_LEN {
19996            payload_buf[0..avail_len].copy_from_slice(__input);
19997            Bytes::new(&payload_buf)
19998        } else {
19999            Bytes::new(__input)
20000        };
20001        let mut __struct = Self::default();
20002        __struct.point_x = buf.get_f32_le();
20003        __struct.point_y = buf.get_f32_le();
20004        __struct.radius = buf.get_f32_le();
20005        __struct.rec_top_x = buf.get_f32_le();
20006        __struct.rec_top_y = buf.get_f32_le();
20007        __struct.rec_bottom_x = buf.get_f32_le();
20008        __struct.rec_bottom_y = buf.get_f32_le();
20009        let tmp = buf.get_u8();
20010        __struct.tracking_status =
20011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20012                enum_type: "CameraTrackingStatusFlags",
20013                value: tmp as u32,
20014            })?;
20015        let tmp = buf.get_u8();
20016        __struct.tracking_mode =
20017            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20018                enum_type: "CameraTrackingMode",
20019                value: tmp as u32,
20020            })?;
20021        let tmp = buf.get_u8();
20022        __struct.target_data =
20023            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
20024                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
20025                    flag_type: "CameraTrackingTargetData",
20026                    value: tmp as u32,
20027                })?;
20028        __struct.camera_device_id = buf.get_u8();
20029        Ok(__struct)
20030    }
20031    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20032        let mut __tmp = BytesMut::new(bytes);
20033        #[allow(clippy::absurd_extreme_comparisons)]
20034        #[allow(unused_comparisons)]
20035        if __tmp.remaining() < Self::ENCODED_LEN {
20036            panic!(
20037                "buffer is too small (need {} bytes, but got {})",
20038                Self::ENCODED_LEN,
20039                __tmp.remaining(),
20040            )
20041        }
20042        __tmp.put_f32_le(self.point_x);
20043        __tmp.put_f32_le(self.point_y);
20044        __tmp.put_f32_le(self.radius);
20045        __tmp.put_f32_le(self.rec_top_x);
20046        __tmp.put_f32_le(self.rec_top_y);
20047        __tmp.put_f32_le(self.rec_bottom_x);
20048        __tmp.put_f32_le(self.rec_bottom_y);
20049        __tmp.put_u8(self.tracking_status as u8);
20050        __tmp.put_u8(self.tracking_mode as u8);
20051        __tmp.put_u8(self.target_data.bits());
20052        __tmp.put_u8(self.camera_device_id);
20053        if matches!(version, MavlinkVersion::V2) {
20054            let len = __tmp.len();
20055            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20056        } else {
20057            __tmp.len()
20058        }
20059    }
20060}
20061#[doc = "id: 90"]
20062#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
20063#[derive(Debug, Clone, PartialEq)]
20064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20066pub struct HIL_STATE_DATA {
20067    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20068    pub time_usec: u64,
20069    #[doc = "Roll angle"]
20070    pub roll: f32,
20071    #[doc = "Pitch angle"]
20072    pub pitch: f32,
20073    #[doc = "Yaw angle"]
20074    pub yaw: f32,
20075    #[doc = "Body frame roll / phi angular speed"]
20076    pub rollspeed: f32,
20077    #[doc = "Body frame pitch / theta angular speed"]
20078    pub pitchspeed: f32,
20079    #[doc = "Body frame yaw / psi angular speed"]
20080    pub yawspeed: f32,
20081    #[doc = "Latitude"]
20082    pub lat: i32,
20083    #[doc = "Longitude"]
20084    pub lon: i32,
20085    #[doc = "Altitude"]
20086    pub alt: i32,
20087    #[doc = "Ground X Speed (Latitude)"]
20088    pub vx: i16,
20089    #[doc = "Ground Y Speed (Longitude)"]
20090    pub vy: i16,
20091    #[doc = "Ground Z Speed (Altitude)"]
20092    pub vz: i16,
20093    #[doc = "X acceleration"]
20094    pub xacc: i16,
20095    #[doc = "Y acceleration"]
20096    pub yacc: i16,
20097    #[doc = "Z acceleration"]
20098    pub zacc: i16,
20099}
20100impl HIL_STATE_DATA {
20101    pub const ENCODED_LEN: usize = 56usize;
20102    pub const DEFAULT: Self = Self {
20103        time_usec: 0_u64,
20104        roll: 0.0_f32,
20105        pitch: 0.0_f32,
20106        yaw: 0.0_f32,
20107        rollspeed: 0.0_f32,
20108        pitchspeed: 0.0_f32,
20109        yawspeed: 0.0_f32,
20110        lat: 0_i32,
20111        lon: 0_i32,
20112        alt: 0_i32,
20113        vx: 0_i16,
20114        vy: 0_i16,
20115        vz: 0_i16,
20116        xacc: 0_i16,
20117        yacc: 0_i16,
20118        zacc: 0_i16,
20119    };
20120    #[cfg(feature = "arbitrary")]
20121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20122        use arbitrary::{Arbitrary, Unstructured};
20123        let mut buf = [0u8; 1024];
20124        rng.fill_bytes(&mut buf);
20125        let mut unstructured = Unstructured::new(&buf);
20126        Self::arbitrary(&mut unstructured).unwrap_or_default()
20127    }
20128}
20129impl Default for HIL_STATE_DATA {
20130    fn default() -> Self {
20131        Self::DEFAULT.clone()
20132    }
20133}
20134impl MessageData for HIL_STATE_DATA {
20135    type Message = MavMessage;
20136    const ID: u32 = 90u32;
20137    const NAME: &'static str = "HIL_STATE";
20138    const EXTRA_CRC: u8 = 183u8;
20139    const ENCODED_LEN: usize = 56usize;
20140    fn deser(
20141        _version: MavlinkVersion,
20142        __input: &[u8],
20143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20144        let avail_len = __input.len();
20145        let mut payload_buf = [0; Self::ENCODED_LEN];
20146        let mut buf = if avail_len < Self::ENCODED_LEN {
20147            payload_buf[0..avail_len].copy_from_slice(__input);
20148            Bytes::new(&payload_buf)
20149        } else {
20150            Bytes::new(__input)
20151        };
20152        let mut __struct = Self::default();
20153        __struct.time_usec = buf.get_u64_le();
20154        __struct.roll = buf.get_f32_le();
20155        __struct.pitch = buf.get_f32_le();
20156        __struct.yaw = buf.get_f32_le();
20157        __struct.rollspeed = buf.get_f32_le();
20158        __struct.pitchspeed = buf.get_f32_le();
20159        __struct.yawspeed = buf.get_f32_le();
20160        __struct.lat = buf.get_i32_le();
20161        __struct.lon = buf.get_i32_le();
20162        __struct.alt = buf.get_i32_le();
20163        __struct.vx = buf.get_i16_le();
20164        __struct.vy = buf.get_i16_le();
20165        __struct.vz = buf.get_i16_le();
20166        __struct.xacc = buf.get_i16_le();
20167        __struct.yacc = buf.get_i16_le();
20168        __struct.zacc = buf.get_i16_le();
20169        Ok(__struct)
20170    }
20171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20172        let mut __tmp = BytesMut::new(bytes);
20173        #[allow(clippy::absurd_extreme_comparisons)]
20174        #[allow(unused_comparisons)]
20175        if __tmp.remaining() < Self::ENCODED_LEN {
20176            panic!(
20177                "buffer is too small (need {} bytes, but got {})",
20178                Self::ENCODED_LEN,
20179                __tmp.remaining(),
20180            )
20181        }
20182        __tmp.put_u64_le(self.time_usec);
20183        __tmp.put_f32_le(self.roll);
20184        __tmp.put_f32_le(self.pitch);
20185        __tmp.put_f32_le(self.yaw);
20186        __tmp.put_f32_le(self.rollspeed);
20187        __tmp.put_f32_le(self.pitchspeed);
20188        __tmp.put_f32_le(self.yawspeed);
20189        __tmp.put_i32_le(self.lat);
20190        __tmp.put_i32_le(self.lon);
20191        __tmp.put_i32_le(self.alt);
20192        __tmp.put_i16_le(self.vx);
20193        __tmp.put_i16_le(self.vy);
20194        __tmp.put_i16_le(self.vz);
20195        __tmp.put_i16_le(self.xacc);
20196        __tmp.put_i16_le(self.yacc);
20197        __tmp.put_i16_le(self.zacc);
20198        if matches!(version, MavlinkVersion::V2) {
20199            let len = __tmp.len();
20200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20201        } else {
20202            __tmp.len()
20203        }
20204    }
20205}
20206#[doc = "id: 323"]
20207#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
20208#[derive(Debug, Clone, PartialEq)]
20209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20211pub struct PARAM_EXT_SET_DATA {
20212    #[doc = "System ID"]
20213    pub target_system: u8,
20214    #[doc = "Component ID"]
20215    pub target_component: u8,
20216    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
20217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20218    pub param_id: [u8; 16],
20219    #[doc = "Parameter value"]
20220    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20221    pub param_value: [u8; 128],
20222    #[doc = "Parameter type."]
20223    pub param_type: MavParamExtType,
20224}
20225impl PARAM_EXT_SET_DATA {
20226    pub const ENCODED_LEN: usize = 147usize;
20227    pub const DEFAULT: Self = Self {
20228        target_system: 0_u8,
20229        target_component: 0_u8,
20230        param_id: [0_u8; 16usize],
20231        param_value: [0_u8; 128usize],
20232        param_type: MavParamExtType::DEFAULT,
20233    };
20234    #[cfg(feature = "arbitrary")]
20235    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20236        use arbitrary::{Arbitrary, Unstructured};
20237        let mut buf = [0u8; 1024];
20238        rng.fill_bytes(&mut buf);
20239        let mut unstructured = Unstructured::new(&buf);
20240        Self::arbitrary(&mut unstructured).unwrap_or_default()
20241    }
20242}
20243impl Default for PARAM_EXT_SET_DATA {
20244    fn default() -> Self {
20245        Self::DEFAULT.clone()
20246    }
20247}
20248impl MessageData for PARAM_EXT_SET_DATA {
20249    type Message = MavMessage;
20250    const ID: u32 = 323u32;
20251    const NAME: &'static str = "PARAM_EXT_SET";
20252    const EXTRA_CRC: u8 = 78u8;
20253    const ENCODED_LEN: usize = 147usize;
20254    fn deser(
20255        _version: MavlinkVersion,
20256        __input: &[u8],
20257    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20258        let avail_len = __input.len();
20259        let mut payload_buf = [0; Self::ENCODED_LEN];
20260        let mut buf = if avail_len < Self::ENCODED_LEN {
20261            payload_buf[0..avail_len].copy_from_slice(__input);
20262            Bytes::new(&payload_buf)
20263        } else {
20264            Bytes::new(__input)
20265        };
20266        let mut __struct = Self::default();
20267        __struct.target_system = buf.get_u8();
20268        __struct.target_component = buf.get_u8();
20269        for v in &mut __struct.param_id {
20270            let val = buf.get_u8();
20271            *v = val;
20272        }
20273        for v in &mut __struct.param_value {
20274            let val = buf.get_u8();
20275            *v = val;
20276        }
20277        let tmp = buf.get_u8();
20278        __struct.param_type =
20279            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20280                enum_type: "MavParamExtType",
20281                value: tmp as u32,
20282            })?;
20283        Ok(__struct)
20284    }
20285    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20286        let mut __tmp = BytesMut::new(bytes);
20287        #[allow(clippy::absurd_extreme_comparisons)]
20288        #[allow(unused_comparisons)]
20289        if __tmp.remaining() < Self::ENCODED_LEN {
20290            panic!(
20291                "buffer is too small (need {} bytes, but got {})",
20292                Self::ENCODED_LEN,
20293                __tmp.remaining(),
20294            )
20295        }
20296        __tmp.put_u8(self.target_system);
20297        __tmp.put_u8(self.target_component);
20298        for val in &self.param_id {
20299            __tmp.put_u8(*val);
20300        }
20301        for val in &self.param_value {
20302            __tmp.put_u8(*val);
20303        }
20304        __tmp.put_u8(self.param_type as u8);
20305        if matches!(version, MavlinkVersion::V2) {
20306            let len = __tmp.len();
20307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20308        } else {
20309            __tmp.len()
20310        }
20311    }
20312}
20313#[doc = "id: 332"]
20314#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
20315#[derive(Debug, Clone, PartialEq)]
20316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20318pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
20319    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20320    pub time_usec: u64,
20321    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
20322    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20323    pub pos_x: [f32; 5],
20324    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
20325    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20326    pub pos_y: [f32; 5],
20327    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
20328    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20329    pub pos_z: [f32; 5],
20330    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
20331    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20332    pub vel_x: [f32; 5],
20333    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
20334    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20335    pub vel_y: [f32; 5],
20336    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
20337    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20338    pub vel_z: [f32; 5],
20339    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
20340    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20341    pub acc_x: [f32; 5],
20342    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
20343    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20344    pub acc_y: [f32; 5],
20345    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
20346    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20347    pub acc_z: [f32; 5],
20348    #[doc = "Yaw angle, set to NaN if not being used"]
20349    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20350    pub pos_yaw: [f32; 5],
20351    #[doc = "Yaw rate, set to NaN if not being used"]
20352    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20353    pub vel_yaw: [f32; 5],
20354    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
20355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20356    pub command: [u16; 5],
20357    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
20358    pub valid_points: u8,
20359}
20360impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
20361    pub const ENCODED_LEN: usize = 239usize;
20362    pub const DEFAULT: Self = Self {
20363        time_usec: 0_u64,
20364        pos_x: [0.0_f32; 5usize],
20365        pos_y: [0.0_f32; 5usize],
20366        pos_z: [0.0_f32; 5usize],
20367        vel_x: [0.0_f32; 5usize],
20368        vel_y: [0.0_f32; 5usize],
20369        vel_z: [0.0_f32; 5usize],
20370        acc_x: [0.0_f32; 5usize],
20371        acc_y: [0.0_f32; 5usize],
20372        acc_z: [0.0_f32; 5usize],
20373        pos_yaw: [0.0_f32; 5usize],
20374        vel_yaw: [0.0_f32; 5usize],
20375        command: [0_u16; 5usize],
20376        valid_points: 0_u8,
20377    };
20378    #[cfg(feature = "arbitrary")]
20379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20380        use arbitrary::{Arbitrary, Unstructured};
20381        let mut buf = [0u8; 1024];
20382        rng.fill_bytes(&mut buf);
20383        let mut unstructured = Unstructured::new(&buf);
20384        Self::arbitrary(&mut unstructured).unwrap_or_default()
20385    }
20386}
20387impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
20388    fn default() -> Self {
20389        Self::DEFAULT.clone()
20390    }
20391}
20392impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
20393    type Message = MavMessage;
20394    const ID: u32 = 332u32;
20395    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
20396    const EXTRA_CRC: u8 = 236u8;
20397    const ENCODED_LEN: usize = 239usize;
20398    fn deser(
20399        _version: MavlinkVersion,
20400        __input: &[u8],
20401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20402        let avail_len = __input.len();
20403        let mut payload_buf = [0; Self::ENCODED_LEN];
20404        let mut buf = if avail_len < Self::ENCODED_LEN {
20405            payload_buf[0..avail_len].copy_from_slice(__input);
20406            Bytes::new(&payload_buf)
20407        } else {
20408            Bytes::new(__input)
20409        };
20410        let mut __struct = Self::default();
20411        __struct.time_usec = buf.get_u64_le();
20412        for v in &mut __struct.pos_x {
20413            let val = buf.get_f32_le();
20414            *v = val;
20415        }
20416        for v in &mut __struct.pos_y {
20417            let val = buf.get_f32_le();
20418            *v = val;
20419        }
20420        for v in &mut __struct.pos_z {
20421            let val = buf.get_f32_le();
20422            *v = val;
20423        }
20424        for v in &mut __struct.vel_x {
20425            let val = buf.get_f32_le();
20426            *v = val;
20427        }
20428        for v in &mut __struct.vel_y {
20429            let val = buf.get_f32_le();
20430            *v = val;
20431        }
20432        for v in &mut __struct.vel_z {
20433            let val = buf.get_f32_le();
20434            *v = val;
20435        }
20436        for v in &mut __struct.acc_x {
20437            let val = buf.get_f32_le();
20438            *v = val;
20439        }
20440        for v in &mut __struct.acc_y {
20441            let val = buf.get_f32_le();
20442            *v = val;
20443        }
20444        for v in &mut __struct.acc_z {
20445            let val = buf.get_f32_le();
20446            *v = val;
20447        }
20448        for v in &mut __struct.pos_yaw {
20449            let val = buf.get_f32_le();
20450            *v = val;
20451        }
20452        for v in &mut __struct.vel_yaw {
20453            let val = buf.get_f32_le();
20454            *v = val;
20455        }
20456        for v in &mut __struct.command {
20457            let val = buf.get_u16_le();
20458            *v = val;
20459        }
20460        __struct.valid_points = buf.get_u8();
20461        Ok(__struct)
20462    }
20463    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20464        let mut __tmp = BytesMut::new(bytes);
20465        #[allow(clippy::absurd_extreme_comparisons)]
20466        #[allow(unused_comparisons)]
20467        if __tmp.remaining() < Self::ENCODED_LEN {
20468            panic!(
20469                "buffer is too small (need {} bytes, but got {})",
20470                Self::ENCODED_LEN,
20471                __tmp.remaining(),
20472            )
20473        }
20474        __tmp.put_u64_le(self.time_usec);
20475        for val in &self.pos_x {
20476            __tmp.put_f32_le(*val);
20477        }
20478        for val in &self.pos_y {
20479            __tmp.put_f32_le(*val);
20480        }
20481        for val in &self.pos_z {
20482            __tmp.put_f32_le(*val);
20483        }
20484        for val in &self.vel_x {
20485            __tmp.put_f32_le(*val);
20486        }
20487        for val in &self.vel_y {
20488            __tmp.put_f32_le(*val);
20489        }
20490        for val in &self.vel_z {
20491            __tmp.put_f32_le(*val);
20492        }
20493        for val in &self.acc_x {
20494            __tmp.put_f32_le(*val);
20495        }
20496        for val in &self.acc_y {
20497            __tmp.put_f32_le(*val);
20498        }
20499        for val in &self.acc_z {
20500            __tmp.put_f32_le(*val);
20501        }
20502        for val in &self.pos_yaw {
20503            __tmp.put_f32_le(*val);
20504        }
20505        for val in &self.vel_yaw {
20506            __tmp.put_f32_le(*val);
20507        }
20508        for val in &self.command {
20509            __tmp.put_u16_le(*val);
20510        }
20511        __tmp.put_u8(self.valid_points);
20512        if matches!(version, MavlinkVersion::V2) {
20513            let len = __tmp.len();
20514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20515        } else {
20516            __tmp.len()
20517        }
20518    }
20519}
20520#[doc = "id: 29"]
20521#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
20522#[derive(Debug, Clone, PartialEq)]
20523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20525pub struct SCALED_PRESSURE_DATA {
20526    #[doc = "Timestamp (time since system boot)."]
20527    pub time_boot_ms: u32,
20528    #[doc = "Absolute pressure"]
20529    pub press_abs: f32,
20530    #[doc = "Differential pressure 1"]
20531    pub press_diff: f32,
20532    #[doc = "Absolute pressure temperature"]
20533    pub temperature: i16,
20534    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
20535    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20536    pub temperature_press_diff: i16,
20537}
20538impl SCALED_PRESSURE_DATA {
20539    pub const ENCODED_LEN: usize = 16usize;
20540    pub const DEFAULT: Self = Self {
20541        time_boot_ms: 0_u32,
20542        press_abs: 0.0_f32,
20543        press_diff: 0.0_f32,
20544        temperature: 0_i16,
20545        temperature_press_diff: 0_i16,
20546    };
20547    #[cfg(feature = "arbitrary")]
20548    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20549        use arbitrary::{Arbitrary, Unstructured};
20550        let mut buf = [0u8; 1024];
20551        rng.fill_bytes(&mut buf);
20552        let mut unstructured = Unstructured::new(&buf);
20553        Self::arbitrary(&mut unstructured).unwrap_or_default()
20554    }
20555}
20556impl Default for SCALED_PRESSURE_DATA {
20557    fn default() -> Self {
20558        Self::DEFAULT.clone()
20559    }
20560}
20561impl MessageData for SCALED_PRESSURE_DATA {
20562    type Message = MavMessage;
20563    const ID: u32 = 29u32;
20564    const NAME: &'static str = "SCALED_PRESSURE";
20565    const EXTRA_CRC: u8 = 115u8;
20566    const ENCODED_LEN: usize = 16usize;
20567    fn deser(
20568        _version: MavlinkVersion,
20569        __input: &[u8],
20570    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20571        let avail_len = __input.len();
20572        let mut payload_buf = [0; Self::ENCODED_LEN];
20573        let mut buf = if avail_len < Self::ENCODED_LEN {
20574            payload_buf[0..avail_len].copy_from_slice(__input);
20575            Bytes::new(&payload_buf)
20576        } else {
20577            Bytes::new(__input)
20578        };
20579        let mut __struct = Self::default();
20580        __struct.time_boot_ms = buf.get_u32_le();
20581        __struct.press_abs = buf.get_f32_le();
20582        __struct.press_diff = buf.get_f32_le();
20583        __struct.temperature = buf.get_i16_le();
20584        __struct.temperature_press_diff = buf.get_i16_le();
20585        Ok(__struct)
20586    }
20587    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20588        let mut __tmp = BytesMut::new(bytes);
20589        #[allow(clippy::absurd_extreme_comparisons)]
20590        #[allow(unused_comparisons)]
20591        if __tmp.remaining() < Self::ENCODED_LEN {
20592            panic!(
20593                "buffer is too small (need {} bytes, but got {})",
20594                Self::ENCODED_LEN,
20595                __tmp.remaining(),
20596            )
20597        }
20598        __tmp.put_u32_le(self.time_boot_ms);
20599        __tmp.put_f32_le(self.press_abs);
20600        __tmp.put_f32_le(self.press_diff);
20601        __tmp.put_i16_le(self.temperature);
20602        __tmp.put_i16_le(self.temperature_press_diff);
20603        if matches!(version, MavlinkVersion::V2) {
20604            let len = __tmp.len();
20605            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20606        } else {
20607            __tmp.len()
20608        }
20609    }
20610}
20611#[doc = "id: 254"]
20612#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
20613#[derive(Debug, Clone, PartialEq)]
20614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20615#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20616pub struct DEBUG_DATA {
20617    #[doc = "Timestamp (time since system boot)."]
20618    pub time_boot_ms: u32,
20619    #[doc = "DEBUG value"]
20620    pub value: f32,
20621    #[doc = "index of debug variable"]
20622    pub ind: u8,
20623}
20624impl DEBUG_DATA {
20625    pub const ENCODED_LEN: usize = 9usize;
20626    pub const DEFAULT: Self = Self {
20627        time_boot_ms: 0_u32,
20628        value: 0.0_f32,
20629        ind: 0_u8,
20630    };
20631    #[cfg(feature = "arbitrary")]
20632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20633        use arbitrary::{Arbitrary, Unstructured};
20634        let mut buf = [0u8; 1024];
20635        rng.fill_bytes(&mut buf);
20636        let mut unstructured = Unstructured::new(&buf);
20637        Self::arbitrary(&mut unstructured).unwrap_or_default()
20638    }
20639}
20640impl Default for DEBUG_DATA {
20641    fn default() -> Self {
20642        Self::DEFAULT.clone()
20643    }
20644}
20645impl MessageData for DEBUG_DATA {
20646    type Message = MavMessage;
20647    const ID: u32 = 254u32;
20648    const NAME: &'static str = "DEBUG";
20649    const EXTRA_CRC: u8 = 46u8;
20650    const ENCODED_LEN: usize = 9usize;
20651    fn deser(
20652        _version: MavlinkVersion,
20653        __input: &[u8],
20654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20655        let avail_len = __input.len();
20656        let mut payload_buf = [0; Self::ENCODED_LEN];
20657        let mut buf = if avail_len < Self::ENCODED_LEN {
20658            payload_buf[0..avail_len].copy_from_slice(__input);
20659            Bytes::new(&payload_buf)
20660        } else {
20661            Bytes::new(__input)
20662        };
20663        let mut __struct = Self::default();
20664        __struct.time_boot_ms = buf.get_u32_le();
20665        __struct.value = buf.get_f32_le();
20666        __struct.ind = buf.get_u8();
20667        Ok(__struct)
20668    }
20669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20670        let mut __tmp = BytesMut::new(bytes);
20671        #[allow(clippy::absurd_extreme_comparisons)]
20672        #[allow(unused_comparisons)]
20673        if __tmp.remaining() < Self::ENCODED_LEN {
20674            panic!(
20675                "buffer is too small (need {} bytes, but got {})",
20676                Self::ENCODED_LEN,
20677                __tmp.remaining(),
20678            )
20679        }
20680        __tmp.put_u32_le(self.time_boot_ms);
20681        __tmp.put_f32_le(self.value);
20682        __tmp.put_u8(self.ind);
20683        if matches!(version, MavlinkVersion::V2) {
20684            let len = __tmp.len();
20685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20686        } else {
20687            __tmp.len()
20688        }
20689    }
20690}
20691#[doc = "id: 350"]
20692#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
20693#[derive(Debug, Clone, PartialEq)]
20694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20696pub struct DEBUG_FLOAT_ARRAY_DATA {
20697    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20698    pub time_usec: u64,
20699    #[doc = "Unique ID used to discriminate between arrays"]
20700    pub array_id: u16,
20701    #[doc = "Name, for human-friendly display in a Ground Control Station"]
20702    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20703    pub name: [u8; 10],
20704    #[doc = "data"]
20705    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20706    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20707    pub data: [f32; 58],
20708}
20709impl DEBUG_FLOAT_ARRAY_DATA {
20710    pub const ENCODED_LEN: usize = 252usize;
20711    pub const DEFAULT: Self = Self {
20712        time_usec: 0_u64,
20713        array_id: 0_u16,
20714        name: [0_u8; 10usize],
20715        data: [0.0_f32; 58usize],
20716    };
20717    #[cfg(feature = "arbitrary")]
20718    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20719        use arbitrary::{Arbitrary, Unstructured};
20720        let mut buf = [0u8; 1024];
20721        rng.fill_bytes(&mut buf);
20722        let mut unstructured = Unstructured::new(&buf);
20723        Self::arbitrary(&mut unstructured).unwrap_or_default()
20724    }
20725}
20726impl Default for DEBUG_FLOAT_ARRAY_DATA {
20727    fn default() -> Self {
20728        Self::DEFAULT.clone()
20729    }
20730}
20731impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
20732    type Message = MavMessage;
20733    const ID: u32 = 350u32;
20734    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
20735    const EXTRA_CRC: u8 = 232u8;
20736    const ENCODED_LEN: usize = 252usize;
20737    fn deser(
20738        _version: MavlinkVersion,
20739        __input: &[u8],
20740    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20741        let avail_len = __input.len();
20742        let mut payload_buf = [0; Self::ENCODED_LEN];
20743        let mut buf = if avail_len < Self::ENCODED_LEN {
20744            payload_buf[0..avail_len].copy_from_slice(__input);
20745            Bytes::new(&payload_buf)
20746        } else {
20747            Bytes::new(__input)
20748        };
20749        let mut __struct = Self::default();
20750        __struct.time_usec = buf.get_u64_le();
20751        __struct.array_id = buf.get_u16_le();
20752        for v in &mut __struct.name {
20753            let val = buf.get_u8();
20754            *v = val;
20755        }
20756        for v in &mut __struct.data {
20757            let val = buf.get_f32_le();
20758            *v = val;
20759        }
20760        Ok(__struct)
20761    }
20762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20763        let mut __tmp = BytesMut::new(bytes);
20764        #[allow(clippy::absurd_extreme_comparisons)]
20765        #[allow(unused_comparisons)]
20766        if __tmp.remaining() < Self::ENCODED_LEN {
20767            panic!(
20768                "buffer is too small (need {} bytes, but got {})",
20769                Self::ENCODED_LEN,
20770                __tmp.remaining(),
20771            )
20772        }
20773        __tmp.put_u64_le(self.time_usec);
20774        __tmp.put_u16_le(self.array_id);
20775        for val in &self.name {
20776            __tmp.put_u8(*val);
20777        }
20778        for val in &self.data {
20779            __tmp.put_f32_le(*val);
20780        }
20781        if matches!(version, MavlinkVersion::V2) {
20782            let len = __tmp.len();
20783            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20784        } else {
20785            __tmp.len()
20786        }
20787    }
20788}
20789#[doc = "id: 301"]
20790#[doc = "The location and information of an AIS vessel."]
20791#[derive(Debug, Clone, PartialEq)]
20792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20794pub struct AIS_VESSEL_DATA {
20795    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
20796    pub MMSI: u32,
20797    #[doc = "Latitude"]
20798    pub lat: i32,
20799    #[doc = "Longitude"]
20800    pub lon: i32,
20801    #[doc = "Course over ground"]
20802    pub COG: u16,
20803    #[doc = "True heading"]
20804    pub heading: u16,
20805    #[doc = "Speed over ground"]
20806    pub velocity: u16,
20807    #[doc = "Distance from lat/lon location to bow"]
20808    pub dimension_bow: u16,
20809    #[doc = "Distance from lat/lon location to stern"]
20810    pub dimension_stern: u16,
20811    #[doc = "Time since last communication in seconds"]
20812    pub tslc: u16,
20813    #[doc = "Bitmask to indicate various statuses including valid data fields"]
20814    pub flags: AisFlags,
20815    #[doc = "Turn rate"]
20816    pub turn_rate: i8,
20817    #[doc = "Navigational status"]
20818    pub navigational_status: AisNavStatus,
20819    #[doc = "Type of vessels"]
20820    pub mavtype: AisType,
20821    #[doc = "Distance from lat/lon location to port side"]
20822    pub dimension_port: u8,
20823    #[doc = "Distance from lat/lon location to starboard side"]
20824    pub dimension_starboard: u8,
20825    #[doc = "The vessel callsign"]
20826    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20827    pub callsign: [u8; 7],
20828    #[doc = "The vessel name"]
20829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20830    pub name: [u8; 20],
20831}
20832impl AIS_VESSEL_DATA {
20833    pub const ENCODED_LEN: usize = 58usize;
20834    pub const DEFAULT: Self = Self {
20835        MMSI: 0_u32,
20836        lat: 0_i32,
20837        lon: 0_i32,
20838        COG: 0_u16,
20839        heading: 0_u16,
20840        velocity: 0_u16,
20841        dimension_bow: 0_u16,
20842        dimension_stern: 0_u16,
20843        tslc: 0_u16,
20844        flags: AisFlags::DEFAULT,
20845        turn_rate: 0_i8,
20846        navigational_status: AisNavStatus::DEFAULT,
20847        mavtype: AisType::DEFAULT,
20848        dimension_port: 0_u8,
20849        dimension_starboard: 0_u8,
20850        callsign: [0_u8; 7usize],
20851        name: [0_u8; 20usize],
20852    };
20853    #[cfg(feature = "arbitrary")]
20854    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20855        use arbitrary::{Arbitrary, Unstructured};
20856        let mut buf = [0u8; 1024];
20857        rng.fill_bytes(&mut buf);
20858        let mut unstructured = Unstructured::new(&buf);
20859        Self::arbitrary(&mut unstructured).unwrap_or_default()
20860    }
20861}
20862impl Default for AIS_VESSEL_DATA {
20863    fn default() -> Self {
20864        Self::DEFAULT.clone()
20865    }
20866}
20867impl MessageData for AIS_VESSEL_DATA {
20868    type Message = MavMessage;
20869    const ID: u32 = 301u32;
20870    const NAME: &'static str = "AIS_VESSEL";
20871    const EXTRA_CRC: u8 = 243u8;
20872    const ENCODED_LEN: usize = 58usize;
20873    fn deser(
20874        _version: MavlinkVersion,
20875        __input: &[u8],
20876    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20877        let avail_len = __input.len();
20878        let mut payload_buf = [0; Self::ENCODED_LEN];
20879        let mut buf = if avail_len < Self::ENCODED_LEN {
20880            payload_buf[0..avail_len].copy_from_slice(__input);
20881            Bytes::new(&payload_buf)
20882        } else {
20883            Bytes::new(__input)
20884        };
20885        let mut __struct = Self::default();
20886        __struct.MMSI = buf.get_u32_le();
20887        __struct.lat = buf.get_i32_le();
20888        __struct.lon = buf.get_i32_le();
20889        __struct.COG = buf.get_u16_le();
20890        __struct.heading = buf.get_u16_le();
20891        __struct.velocity = buf.get_u16_le();
20892        __struct.dimension_bow = buf.get_u16_le();
20893        __struct.dimension_stern = buf.get_u16_le();
20894        __struct.tslc = buf.get_u16_le();
20895        let tmp = buf.get_u16_le();
20896        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
20897            ::mavlink_core::error::ParserError::InvalidFlag {
20898                flag_type: "AisFlags",
20899                value: tmp as u32,
20900            },
20901        )?;
20902        __struct.turn_rate = buf.get_i8();
20903        let tmp = buf.get_u8();
20904        __struct.navigational_status =
20905            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20906                enum_type: "AisNavStatus",
20907                value: tmp as u32,
20908            })?;
20909        let tmp = buf.get_u8();
20910        __struct.mavtype =
20911            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20912                enum_type: "AisType",
20913                value: tmp as u32,
20914            })?;
20915        __struct.dimension_port = buf.get_u8();
20916        __struct.dimension_starboard = buf.get_u8();
20917        for v in &mut __struct.callsign {
20918            let val = buf.get_u8();
20919            *v = val;
20920        }
20921        for v in &mut __struct.name {
20922            let val = buf.get_u8();
20923            *v = val;
20924        }
20925        Ok(__struct)
20926    }
20927    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20928        let mut __tmp = BytesMut::new(bytes);
20929        #[allow(clippy::absurd_extreme_comparisons)]
20930        #[allow(unused_comparisons)]
20931        if __tmp.remaining() < Self::ENCODED_LEN {
20932            panic!(
20933                "buffer is too small (need {} bytes, but got {})",
20934                Self::ENCODED_LEN,
20935                __tmp.remaining(),
20936            )
20937        }
20938        __tmp.put_u32_le(self.MMSI);
20939        __tmp.put_i32_le(self.lat);
20940        __tmp.put_i32_le(self.lon);
20941        __tmp.put_u16_le(self.COG);
20942        __tmp.put_u16_le(self.heading);
20943        __tmp.put_u16_le(self.velocity);
20944        __tmp.put_u16_le(self.dimension_bow);
20945        __tmp.put_u16_le(self.dimension_stern);
20946        __tmp.put_u16_le(self.tslc);
20947        __tmp.put_u16_le(self.flags.bits());
20948        __tmp.put_i8(self.turn_rate);
20949        __tmp.put_u8(self.navigational_status as u8);
20950        __tmp.put_u8(self.mavtype as u8);
20951        __tmp.put_u8(self.dimension_port);
20952        __tmp.put_u8(self.dimension_starboard);
20953        for val in &self.callsign {
20954            __tmp.put_u8(*val);
20955        }
20956        for val in &self.name {
20957            __tmp.put_u8(*val);
20958        }
20959        if matches!(version, MavlinkVersion::V2) {
20960            let len = __tmp.len();
20961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20962        } else {
20963            __tmp.len()
20964        }
20965    }
20966}
20967#[doc = "id: 331"]
20968#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20969#[derive(Debug, Clone, PartialEq)]
20970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20972pub struct ODOMETRY_DATA {
20973    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20974    pub time_usec: u64,
20975    #[doc = "X Position"]
20976    pub x: f32,
20977    #[doc = "Y Position"]
20978    pub y: f32,
20979    #[doc = "Z Position"]
20980    pub z: f32,
20981    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
20982    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20983    pub q: [f32; 4],
20984    #[doc = "X linear speed"]
20985    pub vx: f32,
20986    #[doc = "Y linear speed"]
20987    pub vy: f32,
20988    #[doc = "Z linear speed"]
20989    pub vz: f32,
20990    #[doc = "Roll angular speed"]
20991    pub rollspeed: f32,
20992    #[doc = "Pitch angular speed"]
20993    pub pitchspeed: f32,
20994    #[doc = "Yaw angular speed"]
20995    pub yawspeed: f32,
20996    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
20997    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20998    pub pose_covariance: [f32; 21],
20999    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21000    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21001    pub velocity_covariance: [f32; 21],
21002    #[doc = "Coordinate frame of reference for the pose data."]
21003    pub frame_id: MavFrame,
21004    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21005    pub child_frame_id: MavFrame,
21006    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21007    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21008    pub reset_counter: u8,
21009    #[doc = "Type of estimator that is providing the odometry."]
21010    #[cfg_attr(feature = "serde", serde(default))]
21011    pub estimator_type: MavEstimatorType,
21012    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21013    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21014    pub quality: i8,
21015}
21016impl ODOMETRY_DATA {
21017    pub const ENCODED_LEN: usize = 233usize;
21018    pub const DEFAULT: Self = Self {
21019        time_usec: 0_u64,
21020        x: 0.0_f32,
21021        y: 0.0_f32,
21022        z: 0.0_f32,
21023        q: [0.0_f32; 4usize],
21024        vx: 0.0_f32,
21025        vy: 0.0_f32,
21026        vz: 0.0_f32,
21027        rollspeed: 0.0_f32,
21028        pitchspeed: 0.0_f32,
21029        yawspeed: 0.0_f32,
21030        pose_covariance: [0.0_f32; 21usize],
21031        velocity_covariance: [0.0_f32; 21usize],
21032        frame_id: MavFrame::DEFAULT,
21033        child_frame_id: MavFrame::DEFAULT,
21034        reset_counter: 0_u8,
21035        estimator_type: MavEstimatorType::DEFAULT,
21036        quality: 0_i8,
21037    };
21038    #[cfg(feature = "arbitrary")]
21039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21040        use arbitrary::{Arbitrary, Unstructured};
21041        let mut buf = [0u8; 1024];
21042        rng.fill_bytes(&mut buf);
21043        let mut unstructured = Unstructured::new(&buf);
21044        Self::arbitrary(&mut unstructured).unwrap_or_default()
21045    }
21046}
21047impl Default for ODOMETRY_DATA {
21048    fn default() -> Self {
21049        Self::DEFAULT.clone()
21050    }
21051}
21052impl MessageData for ODOMETRY_DATA {
21053    type Message = MavMessage;
21054    const ID: u32 = 331u32;
21055    const NAME: &'static str = "ODOMETRY";
21056    const EXTRA_CRC: u8 = 91u8;
21057    const ENCODED_LEN: usize = 233usize;
21058    fn deser(
21059        _version: MavlinkVersion,
21060        __input: &[u8],
21061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21062        let avail_len = __input.len();
21063        let mut payload_buf = [0; Self::ENCODED_LEN];
21064        let mut buf = if avail_len < Self::ENCODED_LEN {
21065            payload_buf[0..avail_len].copy_from_slice(__input);
21066            Bytes::new(&payload_buf)
21067        } else {
21068            Bytes::new(__input)
21069        };
21070        let mut __struct = Self::default();
21071        __struct.time_usec = buf.get_u64_le();
21072        __struct.x = buf.get_f32_le();
21073        __struct.y = buf.get_f32_le();
21074        __struct.z = buf.get_f32_le();
21075        for v in &mut __struct.q {
21076            let val = buf.get_f32_le();
21077            *v = val;
21078        }
21079        __struct.vx = buf.get_f32_le();
21080        __struct.vy = buf.get_f32_le();
21081        __struct.vz = buf.get_f32_le();
21082        __struct.rollspeed = buf.get_f32_le();
21083        __struct.pitchspeed = buf.get_f32_le();
21084        __struct.yawspeed = buf.get_f32_le();
21085        for v in &mut __struct.pose_covariance {
21086            let val = buf.get_f32_le();
21087            *v = val;
21088        }
21089        for v in &mut __struct.velocity_covariance {
21090            let val = buf.get_f32_le();
21091            *v = val;
21092        }
21093        let tmp = buf.get_u8();
21094        __struct.frame_id =
21095            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21096                enum_type: "MavFrame",
21097                value: tmp as u32,
21098            })?;
21099        let tmp = buf.get_u8();
21100        __struct.child_frame_id =
21101            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21102                enum_type: "MavFrame",
21103                value: tmp as u32,
21104            })?;
21105        __struct.reset_counter = buf.get_u8();
21106        let tmp = buf.get_u8();
21107        __struct.estimator_type =
21108            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21109                enum_type: "MavEstimatorType",
21110                value: tmp as u32,
21111            })?;
21112        __struct.quality = buf.get_i8();
21113        Ok(__struct)
21114    }
21115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21116        let mut __tmp = BytesMut::new(bytes);
21117        #[allow(clippy::absurd_extreme_comparisons)]
21118        #[allow(unused_comparisons)]
21119        if __tmp.remaining() < Self::ENCODED_LEN {
21120            panic!(
21121                "buffer is too small (need {} bytes, but got {})",
21122                Self::ENCODED_LEN,
21123                __tmp.remaining(),
21124            )
21125        }
21126        __tmp.put_u64_le(self.time_usec);
21127        __tmp.put_f32_le(self.x);
21128        __tmp.put_f32_le(self.y);
21129        __tmp.put_f32_le(self.z);
21130        for val in &self.q {
21131            __tmp.put_f32_le(*val);
21132        }
21133        __tmp.put_f32_le(self.vx);
21134        __tmp.put_f32_le(self.vy);
21135        __tmp.put_f32_le(self.vz);
21136        __tmp.put_f32_le(self.rollspeed);
21137        __tmp.put_f32_le(self.pitchspeed);
21138        __tmp.put_f32_le(self.yawspeed);
21139        for val in &self.pose_covariance {
21140            __tmp.put_f32_le(*val);
21141        }
21142        for val in &self.velocity_covariance {
21143            __tmp.put_f32_le(*val);
21144        }
21145        __tmp.put_u8(self.frame_id as u8);
21146        __tmp.put_u8(self.child_frame_id as u8);
21147        __tmp.put_u8(self.reset_counter);
21148        __tmp.put_u8(self.estimator_type as u8);
21149        __tmp.put_i8(self.quality);
21150        if matches!(version, MavlinkVersion::V2) {
21151            let len = __tmp.len();
21152            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21153        } else {
21154            __tmp.len()
21155        }
21156    }
21157}
21158#[doc = "id: 110"]
21159#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
21160#[derive(Debug, Clone, PartialEq)]
21161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21163pub struct FILE_TRANSFER_PROTOCOL_DATA {
21164    #[doc = "Network ID (0 for broadcast)"]
21165    pub target_network: u8,
21166    #[doc = "System ID (0 for broadcast)"]
21167    pub target_system: u8,
21168    #[doc = "Component ID (0 for broadcast)"]
21169    pub target_component: u8,
21170    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
21171    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21172    pub payload: [u8; 251],
21173}
21174impl FILE_TRANSFER_PROTOCOL_DATA {
21175    pub const ENCODED_LEN: usize = 254usize;
21176    pub const DEFAULT: Self = Self {
21177        target_network: 0_u8,
21178        target_system: 0_u8,
21179        target_component: 0_u8,
21180        payload: [0_u8; 251usize],
21181    };
21182    #[cfg(feature = "arbitrary")]
21183    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21184        use arbitrary::{Arbitrary, Unstructured};
21185        let mut buf = [0u8; 1024];
21186        rng.fill_bytes(&mut buf);
21187        let mut unstructured = Unstructured::new(&buf);
21188        Self::arbitrary(&mut unstructured).unwrap_or_default()
21189    }
21190}
21191impl Default for FILE_TRANSFER_PROTOCOL_DATA {
21192    fn default() -> Self {
21193        Self::DEFAULT.clone()
21194    }
21195}
21196impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
21197    type Message = MavMessage;
21198    const ID: u32 = 110u32;
21199    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
21200    const EXTRA_CRC: u8 = 84u8;
21201    const ENCODED_LEN: usize = 254usize;
21202    fn deser(
21203        _version: MavlinkVersion,
21204        __input: &[u8],
21205    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21206        let avail_len = __input.len();
21207        let mut payload_buf = [0; Self::ENCODED_LEN];
21208        let mut buf = if avail_len < Self::ENCODED_LEN {
21209            payload_buf[0..avail_len].copy_from_slice(__input);
21210            Bytes::new(&payload_buf)
21211        } else {
21212            Bytes::new(__input)
21213        };
21214        let mut __struct = Self::default();
21215        __struct.target_network = buf.get_u8();
21216        __struct.target_system = buf.get_u8();
21217        __struct.target_component = buf.get_u8();
21218        for v in &mut __struct.payload {
21219            let val = buf.get_u8();
21220            *v = val;
21221        }
21222        Ok(__struct)
21223    }
21224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21225        let mut __tmp = BytesMut::new(bytes);
21226        #[allow(clippy::absurd_extreme_comparisons)]
21227        #[allow(unused_comparisons)]
21228        if __tmp.remaining() < Self::ENCODED_LEN {
21229            panic!(
21230                "buffer is too small (need {} bytes, but got {})",
21231                Self::ENCODED_LEN,
21232                __tmp.remaining(),
21233            )
21234        }
21235        __tmp.put_u8(self.target_network);
21236        __tmp.put_u8(self.target_system);
21237        __tmp.put_u8(self.target_component);
21238        for val in &self.payload {
21239            __tmp.put_u8(*val);
21240        }
21241        if matches!(version, MavlinkVersion::V2) {
21242            let len = __tmp.len();
21243            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21244        } else {
21245            __tmp.len()
21246        }
21247    }
21248}
21249#[doc = "id: 87"]
21250#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
21251#[derive(Debug, Clone, PartialEq)]
21252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21254pub struct POSITION_TARGET_GLOBAL_INT_DATA {
21255    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
21256    pub time_boot_ms: u32,
21257    #[doc = "Latitude in WGS84 frame"]
21258    pub lat_int: i32,
21259    #[doc = "Longitude in WGS84 frame"]
21260    pub lon_int: i32,
21261    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
21262    pub alt: f32,
21263    #[doc = "X velocity in NED frame"]
21264    pub vx: f32,
21265    #[doc = "Y velocity in NED frame"]
21266    pub vy: f32,
21267    #[doc = "Z velocity in NED frame"]
21268    pub vz: f32,
21269    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
21270    pub afx: f32,
21271    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
21272    pub afy: f32,
21273    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
21274    pub afz: f32,
21275    #[doc = "yaw setpoint"]
21276    pub yaw: f32,
21277    #[doc = "yaw rate setpoint"]
21278    pub yaw_rate: f32,
21279    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
21280    pub type_mask: PositionTargetTypemask,
21281    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
21282    pub coordinate_frame: MavFrame,
21283}
21284impl POSITION_TARGET_GLOBAL_INT_DATA {
21285    pub const ENCODED_LEN: usize = 51usize;
21286    pub const DEFAULT: Self = Self {
21287        time_boot_ms: 0_u32,
21288        lat_int: 0_i32,
21289        lon_int: 0_i32,
21290        alt: 0.0_f32,
21291        vx: 0.0_f32,
21292        vy: 0.0_f32,
21293        vz: 0.0_f32,
21294        afx: 0.0_f32,
21295        afy: 0.0_f32,
21296        afz: 0.0_f32,
21297        yaw: 0.0_f32,
21298        yaw_rate: 0.0_f32,
21299        type_mask: PositionTargetTypemask::DEFAULT,
21300        coordinate_frame: MavFrame::DEFAULT,
21301    };
21302    #[cfg(feature = "arbitrary")]
21303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21304        use arbitrary::{Arbitrary, Unstructured};
21305        let mut buf = [0u8; 1024];
21306        rng.fill_bytes(&mut buf);
21307        let mut unstructured = Unstructured::new(&buf);
21308        Self::arbitrary(&mut unstructured).unwrap_or_default()
21309    }
21310}
21311impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
21312    fn default() -> Self {
21313        Self::DEFAULT.clone()
21314    }
21315}
21316impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
21317    type Message = MavMessage;
21318    const ID: u32 = 87u32;
21319    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
21320    const EXTRA_CRC: u8 = 150u8;
21321    const ENCODED_LEN: usize = 51usize;
21322    fn deser(
21323        _version: MavlinkVersion,
21324        __input: &[u8],
21325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21326        let avail_len = __input.len();
21327        let mut payload_buf = [0; Self::ENCODED_LEN];
21328        let mut buf = if avail_len < Self::ENCODED_LEN {
21329            payload_buf[0..avail_len].copy_from_slice(__input);
21330            Bytes::new(&payload_buf)
21331        } else {
21332            Bytes::new(__input)
21333        };
21334        let mut __struct = Self::default();
21335        __struct.time_boot_ms = buf.get_u32_le();
21336        __struct.lat_int = buf.get_i32_le();
21337        __struct.lon_int = buf.get_i32_le();
21338        __struct.alt = buf.get_f32_le();
21339        __struct.vx = buf.get_f32_le();
21340        __struct.vy = buf.get_f32_le();
21341        __struct.vz = buf.get_f32_le();
21342        __struct.afx = buf.get_f32_le();
21343        __struct.afy = buf.get_f32_le();
21344        __struct.afz = buf.get_f32_le();
21345        __struct.yaw = buf.get_f32_le();
21346        __struct.yaw_rate = buf.get_f32_le();
21347        let tmp = buf.get_u16_le();
21348        __struct.type_mask = PositionTargetTypemask::from_bits(
21349            tmp & PositionTargetTypemask::all().bits(),
21350        )
21351        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
21352            flag_type: "PositionTargetTypemask",
21353            value: tmp as u32,
21354        })?;
21355        let tmp = buf.get_u8();
21356        __struct.coordinate_frame =
21357            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21358                enum_type: "MavFrame",
21359                value: tmp as u32,
21360            })?;
21361        Ok(__struct)
21362    }
21363    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21364        let mut __tmp = BytesMut::new(bytes);
21365        #[allow(clippy::absurd_extreme_comparisons)]
21366        #[allow(unused_comparisons)]
21367        if __tmp.remaining() < Self::ENCODED_LEN {
21368            panic!(
21369                "buffer is too small (need {} bytes, but got {})",
21370                Self::ENCODED_LEN,
21371                __tmp.remaining(),
21372            )
21373        }
21374        __tmp.put_u32_le(self.time_boot_ms);
21375        __tmp.put_i32_le(self.lat_int);
21376        __tmp.put_i32_le(self.lon_int);
21377        __tmp.put_f32_le(self.alt);
21378        __tmp.put_f32_le(self.vx);
21379        __tmp.put_f32_le(self.vy);
21380        __tmp.put_f32_le(self.vz);
21381        __tmp.put_f32_le(self.afx);
21382        __tmp.put_f32_le(self.afy);
21383        __tmp.put_f32_le(self.afz);
21384        __tmp.put_f32_le(self.yaw);
21385        __tmp.put_f32_le(self.yaw_rate);
21386        __tmp.put_u16_le(self.type_mask.bits());
21387        __tmp.put_u8(self.coordinate_frame as u8);
21388        if matches!(version, MavlinkVersion::V2) {
21389            let len = __tmp.len();
21390            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21391        } else {
21392            __tmp.len()
21393        }
21394    }
21395}
21396#[doc = "id: 243"]
21397#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
21398#[derive(Debug, Clone, PartialEq)]
21399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21401pub struct SET_HOME_POSITION_DATA {
21402    #[doc = "Latitude (WGS84)"]
21403    pub latitude: i32,
21404    #[doc = "Longitude (WGS84)"]
21405    pub longitude: i32,
21406    #[doc = "Altitude (MSL). Positive for up."]
21407    pub altitude: i32,
21408    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
21409    pub x: f32,
21410    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
21411    pub y: f32,
21412    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
21413    pub z: f32,
21414    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
21415    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21416    pub q: [f32; 4],
21417    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
21418    pub approach_x: f32,
21419    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
21420    pub approach_y: f32,
21421    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
21422    pub approach_z: f32,
21423    #[doc = "System ID."]
21424    pub target_system: u8,
21425    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21426    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21427    pub time_usec: u64,
21428}
21429impl SET_HOME_POSITION_DATA {
21430    pub const ENCODED_LEN: usize = 61usize;
21431    pub const DEFAULT: Self = Self {
21432        latitude: 0_i32,
21433        longitude: 0_i32,
21434        altitude: 0_i32,
21435        x: 0.0_f32,
21436        y: 0.0_f32,
21437        z: 0.0_f32,
21438        q: [0.0_f32; 4usize],
21439        approach_x: 0.0_f32,
21440        approach_y: 0.0_f32,
21441        approach_z: 0.0_f32,
21442        target_system: 0_u8,
21443        time_usec: 0_u64,
21444    };
21445    #[cfg(feature = "arbitrary")]
21446    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21447        use arbitrary::{Arbitrary, Unstructured};
21448        let mut buf = [0u8; 1024];
21449        rng.fill_bytes(&mut buf);
21450        let mut unstructured = Unstructured::new(&buf);
21451        Self::arbitrary(&mut unstructured).unwrap_or_default()
21452    }
21453}
21454impl Default for SET_HOME_POSITION_DATA {
21455    fn default() -> Self {
21456        Self::DEFAULT.clone()
21457    }
21458}
21459impl MessageData for SET_HOME_POSITION_DATA {
21460    type Message = MavMessage;
21461    const ID: u32 = 243u32;
21462    const NAME: &'static str = "SET_HOME_POSITION";
21463    const EXTRA_CRC: u8 = 85u8;
21464    const ENCODED_LEN: usize = 61usize;
21465    fn deser(
21466        _version: MavlinkVersion,
21467        __input: &[u8],
21468    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21469        let avail_len = __input.len();
21470        let mut payload_buf = [0; Self::ENCODED_LEN];
21471        let mut buf = if avail_len < Self::ENCODED_LEN {
21472            payload_buf[0..avail_len].copy_from_slice(__input);
21473            Bytes::new(&payload_buf)
21474        } else {
21475            Bytes::new(__input)
21476        };
21477        let mut __struct = Self::default();
21478        __struct.latitude = buf.get_i32_le();
21479        __struct.longitude = buf.get_i32_le();
21480        __struct.altitude = buf.get_i32_le();
21481        __struct.x = buf.get_f32_le();
21482        __struct.y = buf.get_f32_le();
21483        __struct.z = buf.get_f32_le();
21484        for v in &mut __struct.q {
21485            let val = buf.get_f32_le();
21486            *v = val;
21487        }
21488        __struct.approach_x = buf.get_f32_le();
21489        __struct.approach_y = buf.get_f32_le();
21490        __struct.approach_z = buf.get_f32_le();
21491        __struct.target_system = buf.get_u8();
21492        __struct.time_usec = buf.get_u64_le();
21493        Ok(__struct)
21494    }
21495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21496        let mut __tmp = BytesMut::new(bytes);
21497        #[allow(clippy::absurd_extreme_comparisons)]
21498        #[allow(unused_comparisons)]
21499        if __tmp.remaining() < Self::ENCODED_LEN {
21500            panic!(
21501                "buffer is too small (need {} bytes, but got {})",
21502                Self::ENCODED_LEN,
21503                __tmp.remaining(),
21504            )
21505        }
21506        __tmp.put_i32_le(self.latitude);
21507        __tmp.put_i32_le(self.longitude);
21508        __tmp.put_i32_le(self.altitude);
21509        __tmp.put_f32_le(self.x);
21510        __tmp.put_f32_le(self.y);
21511        __tmp.put_f32_le(self.z);
21512        for val in &self.q {
21513            __tmp.put_f32_le(*val);
21514        }
21515        __tmp.put_f32_le(self.approach_x);
21516        __tmp.put_f32_le(self.approach_y);
21517        __tmp.put_f32_le(self.approach_z);
21518        __tmp.put_u8(self.target_system);
21519        __tmp.put_u64_le(self.time_usec);
21520        if matches!(version, MavlinkVersion::V2) {
21521            let len = __tmp.len();
21522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21523        } else {
21524            __tmp.len()
21525        }
21526    }
21527}
21528#[doc = "id: 50"]
21529#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
21530#[derive(Debug, Clone, PartialEq)]
21531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21533pub struct PARAM_MAP_RC_DATA {
21534    #[doc = "Initial parameter value"]
21535    pub param_value0: f32,
21536    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
21537    pub scale: f32,
21538    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
21539    pub param_value_min: f32,
21540    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
21541    pub param_value_max: f32,
21542    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
21543    pub param_index: i16,
21544    #[doc = "System ID"]
21545    pub target_system: u8,
21546    #[doc = "Component ID"]
21547    pub target_component: u8,
21548    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
21549    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21550    pub param_id: [u8; 16],
21551    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
21552    pub parameter_rc_channel_index: u8,
21553}
21554impl PARAM_MAP_RC_DATA {
21555    pub const ENCODED_LEN: usize = 37usize;
21556    pub const DEFAULT: Self = Self {
21557        param_value0: 0.0_f32,
21558        scale: 0.0_f32,
21559        param_value_min: 0.0_f32,
21560        param_value_max: 0.0_f32,
21561        param_index: 0_i16,
21562        target_system: 0_u8,
21563        target_component: 0_u8,
21564        param_id: [0_u8; 16usize],
21565        parameter_rc_channel_index: 0_u8,
21566    };
21567    #[cfg(feature = "arbitrary")]
21568    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21569        use arbitrary::{Arbitrary, Unstructured};
21570        let mut buf = [0u8; 1024];
21571        rng.fill_bytes(&mut buf);
21572        let mut unstructured = Unstructured::new(&buf);
21573        Self::arbitrary(&mut unstructured).unwrap_or_default()
21574    }
21575}
21576impl Default for PARAM_MAP_RC_DATA {
21577    fn default() -> Self {
21578        Self::DEFAULT.clone()
21579    }
21580}
21581impl MessageData for PARAM_MAP_RC_DATA {
21582    type Message = MavMessage;
21583    const ID: u32 = 50u32;
21584    const NAME: &'static str = "PARAM_MAP_RC";
21585    const EXTRA_CRC: u8 = 78u8;
21586    const ENCODED_LEN: usize = 37usize;
21587    fn deser(
21588        _version: MavlinkVersion,
21589        __input: &[u8],
21590    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21591        let avail_len = __input.len();
21592        let mut payload_buf = [0; Self::ENCODED_LEN];
21593        let mut buf = if avail_len < Self::ENCODED_LEN {
21594            payload_buf[0..avail_len].copy_from_slice(__input);
21595            Bytes::new(&payload_buf)
21596        } else {
21597            Bytes::new(__input)
21598        };
21599        let mut __struct = Self::default();
21600        __struct.param_value0 = buf.get_f32_le();
21601        __struct.scale = buf.get_f32_le();
21602        __struct.param_value_min = buf.get_f32_le();
21603        __struct.param_value_max = buf.get_f32_le();
21604        __struct.param_index = buf.get_i16_le();
21605        __struct.target_system = buf.get_u8();
21606        __struct.target_component = buf.get_u8();
21607        for v in &mut __struct.param_id {
21608            let val = buf.get_u8();
21609            *v = val;
21610        }
21611        __struct.parameter_rc_channel_index = buf.get_u8();
21612        Ok(__struct)
21613    }
21614    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21615        let mut __tmp = BytesMut::new(bytes);
21616        #[allow(clippy::absurd_extreme_comparisons)]
21617        #[allow(unused_comparisons)]
21618        if __tmp.remaining() < Self::ENCODED_LEN {
21619            panic!(
21620                "buffer is too small (need {} bytes, but got {})",
21621                Self::ENCODED_LEN,
21622                __tmp.remaining(),
21623            )
21624        }
21625        __tmp.put_f32_le(self.param_value0);
21626        __tmp.put_f32_le(self.scale);
21627        __tmp.put_f32_le(self.param_value_min);
21628        __tmp.put_f32_le(self.param_value_max);
21629        __tmp.put_i16_le(self.param_index);
21630        __tmp.put_u8(self.target_system);
21631        __tmp.put_u8(self.target_component);
21632        for val in &self.param_id {
21633            __tmp.put_u8(*val);
21634        }
21635        __tmp.put_u8(self.parameter_rc_channel_index);
21636        if matches!(version, MavlinkVersion::V2) {
21637            let len = __tmp.len();
21638            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21639        } else {
21640            __tmp.len()
21641        }
21642    }
21643}
21644#[doc = "id: 6"]
21645#[doc = "Accept / deny control of this MAV."]
21646#[derive(Debug, Clone, PartialEq)]
21647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21649pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
21650    #[doc = "ID of the GCS this message"]
21651    pub gcs_system_id: u8,
21652    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
21653    pub control_request: u8,
21654    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
21655    pub ack: u8,
21656}
21657impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
21658    pub const ENCODED_LEN: usize = 3usize;
21659    pub const DEFAULT: Self = Self {
21660        gcs_system_id: 0_u8,
21661        control_request: 0_u8,
21662        ack: 0_u8,
21663    };
21664    #[cfg(feature = "arbitrary")]
21665    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21666        use arbitrary::{Arbitrary, Unstructured};
21667        let mut buf = [0u8; 1024];
21668        rng.fill_bytes(&mut buf);
21669        let mut unstructured = Unstructured::new(&buf);
21670        Self::arbitrary(&mut unstructured).unwrap_or_default()
21671    }
21672}
21673impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
21674    fn default() -> Self {
21675        Self::DEFAULT.clone()
21676    }
21677}
21678impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
21679    type Message = MavMessage;
21680    const ID: u32 = 6u32;
21681    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
21682    const EXTRA_CRC: u8 = 104u8;
21683    const ENCODED_LEN: usize = 3usize;
21684    fn deser(
21685        _version: MavlinkVersion,
21686        __input: &[u8],
21687    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21688        let avail_len = __input.len();
21689        let mut payload_buf = [0; Self::ENCODED_LEN];
21690        let mut buf = if avail_len < Self::ENCODED_LEN {
21691            payload_buf[0..avail_len].copy_from_slice(__input);
21692            Bytes::new(&payload_buf)
21693        } else {
21694            Bytes::new(__input)
21695        };
21696        let mut __struct = Self::default();
21697        __struct.gcs_system_id = buf.get_u8();
21698        __struct.control_request = buf.get_u8();
21699        __struct.ack = buf.get_u8();
21700        Ok(__struct)
21701    }
21702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21703        let mut __tmp = BytesMut::new(bytes);
21704        #[allow(clippy::absurd_extreme_comparisons)]
21705        #[allow(unused_comparisons)]
21706        if __tmp.remaining() < Self::ENCODED_LEN {
21707            panic!(
21708                "buffer is too small (need {} bytes, but got {})",
21709                Self::ENCODED_LEN,
21710                __tmp.remaining(),
21711            )
21712        }
21713        __tmp.put_u8(self.gcs_system_id);
21714        __tmp.put_u8(self.control_request);
21715        __tmp.put_u8(self.ack);
21716        if matches!(version, MavlinkVersion::V2) {
21717            let len = __tmp.len();
21718            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21719        } else {
21720            __tmp.len()
21721        }
21722    }
21723}
21724#[doc = "id: 76"]
21725#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
21726#[derive(Debug, Clone, PartialEq)]
21727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21728#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21729pub struct COMMAND_LONG_DATA {
21730    #[doc = "Parameter 1 (for the specific command)."]
21731    pub param1: f32,
21732    #[doc = "Parameter 2 (for the specific command)."]
21733    pub param2: f32,
21734    #[doc = "Parameter 3 (for the specific command)."]
21735    pub param3: f32,
21736    #[doc = "Parameter 4 (for the specific command)."]
21737    pub param4: f32,
21738    #[doc = "Parameter 5 (for the specific command)."]
21739    pub param5: f32,
21740    #[doc = "Parameter 6 (for the specific command)."]
21741    pub param6: f32,
21742    #[doc = "Parameter 7 (for the specific command)."]
21743    pub param7: f32,
21744    #[doc = "Command ID (of command to send)."]
21745    pub command: MavCmd,
21746    #[doc = "System which should execute the command"]
21747    pub target_system: u8,
21748    #[doc = "Component which should execute the command, 0 for all components"]
21749    pub target_component: u8,
21750    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
21751    pub confirmation: u8,
21752}
21753impl COMMAND_LONG_DATA {
21754    pub const ENCODED_LEN: usize = 33usize;
21755    pub const DEFAULT: Self = Self {
21756        param1: 0.0_f32,
21757        param2: 0.0_f32,
21758        param3: 0.0_f32,
21759        param4: 0.0_f32,
21760        param5: 0.0_f32,
21761        param6: 0.0_f32,
21762        param7: 0.0_f32,
21763        command: MavCmd::DEFAULT,
21764        target_system: 0_u8,
21765        target_component: 0_u8,
21766        confirmation: 0_u8,
21767    };
21768    #[cfg(feature = "arbitrary")]
21769    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21770        use arbitrary::{Arbitrary, Unstructured};
21771        let mut buf = [0u8; 1024];
21772        rng.fill_bytes(&mut buf);
21773        let mut unstructured = Unstructured::new(&buf);
21774        Self::arbitrary(&mut unstructured).unwrap_or_default()
21775    }
21776}
21777impl Default for COMMAND_LONG_DATA {
21778    fn default() -> Self {
21779        Self::DEFAULT.clone()
21780    }
21781}
21782impl MessageData for COMMAND_LONG_DATA {
21783    type Message = MavMessage;
21784    const ID: u32 = 76u32;
21785    const NAME: &'static str = "COMMAND_LONG";
21786    const EXTRA_CRC: u8 = 152u8;
21787    const ENCODED_LEN: usize = 33usize;
21788    fn deser(
21789        _version: MavlinkVersion,
21790        __input: &[u8],
21791    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21792        let avail_len = __input.len();
21793        let mut payload_buf = [0; Self::ENCODED_LEN];
21794        let mut buf = if avail_len < Self::ENCODED_LEN {
21795            payload_buf[0..avail_len].copy_from_slice(__input);
21796            Bytes::new(&payload_buf)
21797        } else {
21798            Bytes::new(__input)
21799        };
21800        let mut __struct = Self::default();
21801        __struct.param1 = buf.get_f32_le();
21802        __struct.param2 = buf.get_f32_le();
21803        __struct.param3 = buf.get_f32_le();
21804        __struct.param4 = buf.get_f32_le();
21805        __struct.param5 = buf.get_f32_le();
21806        __struct.param6 = buf.get_f32_le();
21807        __struct.param7 = buf.get_f32_le();
21808        let tmp = buf.get_u16_le();
21809        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
21810            ::mavlink_core::error::ParserError::InvalidEnum {
21811                enum_type: "MavCmd",
21812                value: tmp as u32,
21813            },
21814        )?;
21815        __struct.target_system = buf.get_u8();
21816        __struct.target_component = buf.get_u8();
21817        __struct.confirmation = buf.get_u8();
21818        Ok(__struct)
21819    }
21820    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21821        let mut __tmp = BytesMut::new(bytes);
21822        #[allow(clippy::absurd_extreme_comparisons)]
21823        #[allow(unused_comparisons)]
21824        if __tmp.remaining() < Self::ENCODED_LEN {
21825            panic!(
21826                "buffer is too small (need {} bytes, but got {})",
21827                Self::ENCODED_LEN,
21828                __tmp.remaining(),
21829            )
21830        }
21831        __tmp.put_f32_le(self.param1);
21832        __tmp.put_f32_le(self.param2);
21833        __tmp.put_f32_le(self.param3);
21834        __tmp.put_f32_le(self.param4);
21835        __tmp.put_f32_le(self.param5);
21836        __tmp.put_f32_le(self.param6);
21837        __tmp.put_f32_le(self.param7);
21838        __tmp.put_u16_le(self.command as u16);
21839        __tmp.put_u8(self.target_system);
21840        __tmp.put_u8(self.target_component);
21841        __tmp.put_u8(self.confirmation);
21842        if matches!(version, MavlinkVersion::V2) {
21843            let len = __tmp.len();
21844            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21845        } else {
21846            __tmp.len()
21847        }
21848    }
21849}
21850#[doc = "id: 232"]
21851#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
21852#[derive(Debug, Clone, PartialEq)]
21853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21855pub struct GPS_INPUT_DATA {
21856    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21857    pub time_usec: u64,
21858    #[doc = "GPS time (from start of GPS week)"]
21859    pub time_week_ms: u32,
21860    #[doc = "Latitude (WGS84)"]
21861    pub lat: i32,
21862    #[doc = "Longitude (WGS84)"]
21863    pub lon: i32,
21864    #[doc = "Altitude (MSL). Positive for up."]
21865    pub alt: f32,
21866    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
21867    pub hdop: f32,
21868    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
21869    pub vdop: f32,
21870    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
21871    pub vn: f32,
21872    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
21873    pub ve: f32,
21874    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
21875    pub vd: f32,
21876    #[doc = "GPS speed accuracy"]
21877    pub speed_accuracy: f32,
21878    #[doc = "GPS horizontal accuracy"]
21879    pub horiz_accuracy: f32,
21880    #[doc = "GPS vertical accuracy"]
21881    pub vert_accuracy: f32,
21882    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
21883    pub ignore_flags: GpsInputIgnoreFlags,
21884    #[doc = "GPS week number"]
21885    pub time_week: u16,
21886    #[doc = "ID of the GPS for multiple GPS inputs"]
21887    pub gps_id: u8,
21888    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
21889    pub fix_type: u8,
21890    #[doc = "Number of satellites visible."]
21891    pub satellites_visible: u8,
21892    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
21893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21894    pub yaw: u16,
21895}
21896impl GPS_INPUT_DATA {
21897    pub const ENCODED_LEN: usize = 65usize;
21898    pub const DEFAULT: Self = Self {
21899        time_usec: 0_u64,
21900        time_week_ms: 0_u32,
21901        lat: 0_i32,
21902        lon: 0_i32,
21903        alt: 0.0_f32,
21904        hdop: 0.0_f32,
21905        vdop: 0.0_f32,
21906        vn: 0.0_f32,
21907        ve: 0.0_f32,
21908        vd: 0.0_f32,
21909        speed_accuracy: 0.0_f32,
21910        horiz_accuracy: 0.0_f32,
21911        vert_accuracy: 0.0_f32,
21912        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
21913        time_week: 0_u16,
21914        gps_id: 0_u8,
21915        fix_type: 0_u8,
21916        satellites_visible: 0_u8,
21917        yaw: 0_u16,
21918    };
21919    #[cfg(feature = "arbitrary")]
21920    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21921        use arbitrary::{Arbitrary, Unstructured};
21922        let mut buf = [0u8; 1024];
21923        rng.fill_bytes(&mut buf);
21924        let mut unstructured = Unstructured::new(&buf);
21925        Self::arbitrary(&mut unstructured).unwrap_or_default()
21926    }
21927}
21928impl Default for GPS_INPUT_DATA {
21929    fn default() -> Self {
21930        Self::DEFAULT.clone()
21931    }
21932}
21933impl MessageData for GPS_INPUT_DATA {
21934    type Message = MavMessage;
21935    const ID: u32 = 232u32;
21936    const NAME: &'static str = "GPS_INPUT";
21937    const EXTRA_CRC: u8 = 151u8;
21938    const ENCODED_LEN: usize = 65usize;
21939    fn deser(
21940        _version: MavlinkVersion,
21941        __input: &[u8],
21942    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21943        let avail_len = __input.len();
21944        let mut payload_buf = [0; Self::ENCODED_LEN];
21945        let mut buf = if avail_len < Self::ENCODED_LEN {
21946            payload_buf[0..avail_len].copy_from_slice(__input);
21947            Bytes::new(&payload_buf)
21948        } else {
21949            Bytes::new(__input)
21950        };
21951        let mut __struct = Self::default();
21952        __struct.time_usec = buf.get_u64_le();
21953        __struct.time_week_ms = buf.get_u32_le();
21954        __struct.lat = buf.get_i32_le();
21955        __struct.lon = buf.get_i32_le();
21956        __struct.alt = buf.get_f32_le();
21957        __struct.hdop = buf.get_f32_le();
21958        __struct.vdop = buf.get_f32_le();
21959        __struct.vn = buf.get_f32_le();
21960        __struct.ve = buf.get_f32_le();
21961        __struct.vd = buf.get_f32_le();
21962        __struct.speed_accuracy = buf.get_f32_le();
21963        __struct.horiz_accuracy = buf.get_f32_le();
21964        __struct.vert_accuracy = buf.get_f32_le();
21965        let tmp = buf.get_u16_le();
21966        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
21967            tmp & GpsInputIgnoreFlags::all().bits(),
21968        )
21969        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
21970            flag_type: "GpsInputIgnoreFlags",
21971            value: tmp as u32,
21972        })?;
21973        __struct.time_week = buf.get_u16_le();
21974        __struct.gps_id = buf.get_u8();
21975        __struct.fix_type = buf.get_u8();
21976        __struct.satellites_visible = buf.get_u8();
21977        __struct.yaw = buf.get_u16_le();
21978        Ok(__struct)
21979    }
21980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21981        let mut __tmp = BytesMut::new(bytes);
21982        #[allow(clippy::absurd_extreme_comparisons)]
21983        #[allow(unused_comparisons)]
21984        if __tmp.remaining() < Self::ENCODED_LEN {
21985            panic!(
21986                "buffer is too small (need {} bytes, but got {})",
21987                Self::ENCODED_LEN,
21988                __tmp.remaining(),
21989            )
21990        }
21991        __tmp.put_u64_le(self.time_usec);
21992        __tmp.put_u32_le(self.time_week_ms);
21993        __tmp.put_i32_le(self.lat);
21994        __tmp.put_i32_le(self.lon);
21995        __tmp.put_f32_le(self.alt);
21996        __tmp.put_f32_le(self.hdop);
21997        __tmp.put_f32_le(self.vdop);
21998        __tmp.put_f32_le(self.vn);
21999        __tmp.put_f32_le(self.ve);
22000        __tmp.put_f32_le(self.vd);
22001        __tmp.put_f32_le(self.speed_accuracy);
22002        __tmp.put_f32_le(self.horiz_accuracy);
22003        __tmp.put_f32_le(self.vert_accuracy);
22004        __tmp.put_u16_le(self.ignore_flags.bits());
22005        __tmp.put_u16_le(self.time_week);
22006        __tmp.put_u8(self.gps_id);
22007        __tmp.put_u8(self.fix_type);
22008        __tmp.put_u8(self.satellites_visible);
22009        __tmp.put_u16_le(self.yaw);
22010        if matches!(version, MavlinkVersion::V2) {
22011            let len = __tmp.len();
22012            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22013        } else {
22014            __tmp.len()
22015        }
22016    }
22017}
22018#[doc = "id: 256"]
22019#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
22020#[derive(Debug, Clone, PartialEq)]
22021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22023pub struct SETUP_SIGNING_DATA {
22024    #[doc = "initial timestamp"]
22025    pub initial_timestamp: u64,
22026    #[doc = "system id of the target"]
22027    pub target_system: u8,
22028    #[doc = "component ID of the target"]
22029    pub target_component: u8,
22030    #[doc = "signing key"]
22031    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22032    pub secret_key: [u8; 32],
22033}
22034impl SETUP_SIGNING_DATA {
22035    pub const ENCODED_LEN: usize = 42usize;
22036    pub const DEFAULT: Self = Self {
22037        initial_timestamp: 0_u64,
22038        target_system: 0_u8,
22039        target_component: 0_u8,
22040        secret_key: [0_u8; 32usize],
22041    };
22042    #[cfg(feature = "arbitrary")]
22043    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22044        use arbitrary::{Arbitrary, Unstructured};
22045        let mut buf = [0u8; 1024];
22046        rng.fill_bytes(&mut buf);
22047        let mut unstructured = Unstructured::new(&buf);
22048        Self::arbitrary(&mut unstructured).unwrap_or_default()
22049    }
22050}
22051impl Default for SETUP_SIGNING_DATA {
22052    fn default() -> Self {
22053        Self::DEFAULT.clone()
22054    }
22055}
22056impl MessageData for SETUP_SIGNING_DATA {
22057    type Message = MavMessage;
22058    const ID: u32 = 256u32;
22059    const NAME: &'static str = "SETUP_SIGNING";
22060    const EXTRA_CRC: u8 = 71u8;
22061    const ENCODED_LEN: usize = 42usize;
22062    fn deser(
22063        _version: MavlinkVersion,
22064        __input: &[u8],
22065    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22066        let avail_len = __input.len();
22067        let mut payload_buf = [0; Self::ENCODED_LEN];
22068        let mut buf = if avail_len < Self::ENCODED_LEN {
22069            payload_buf[0..avail_len].copy_from_slice(__input);
22070            Bytes::new(&payload_buf)
22071        } else {
22072            Bytes::new(__input)
22073        };
22074        let mut __struct = Self::default();
22075        __struct.initial_timestamp = buf.get_u64_le();
22076        __struct.target_system = buf.get_u8();
22077        __struct.target_component = buf.get_u8();
22078        for v in &mut __struct.secret_key {
22079            let val = buf.get_u8();
22080            *v = val;
22081        }
22082        Ok(__struct)
22083    }
22084    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22085        let mut __tmp = BytesMut::new(bytes);
22086        #[allow(clippy::absurd_extreme_comparisons)]
22087        #[allow(unused_comparisons)]
22088        if __tmp.remaining() < Self::ENCODED_LEN {
22089            panic!(
22090                "buffer is too small (need {} bytes, but got {})",
22091                Self::ENCODED_LEN,
22092                __tmp.remaining(),
22093            )
22094        }
22095        __tmp.put_u64_le(self.initial_timestamp);
22096        __tmp.put_u8(self.target_system);
22097        __tmp.put_u8(self.target_component);
22098        for val in &self.secret_key {
22099            __tmp.put_u8(*val);
22100        }
22101        if matches!(version, MavlinkVersion::V2) {
22102            let len = __tmp.len();
22103            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22104        } else {
22105            __tmp.len()
22106        }
22107    }
22108}
22109#[doc = "id: 266"]
22110#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
22111#[derive(Debug, Clone, PartialEq)]
22112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22114pub struct LOGGING_DATA_DATA {
22115    #[doc = "sequence number (can wrap)"]
22116    pub sequence: u16,
22117    #[doc = "system ID of the target"]
22118    pub target_system: u8,
22119    #[doc = "component ID of the target"]
22120    pub target_component: u8,
22121    #[doc = "data length"]
22122    pub length: u8,
22123    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
22124    pub first_message_offset: u8,
22125    #[doc = "logged data"]
22126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22127    pub data: [u8; 249],
22128}
22129impl LOGGING_DATA_DATA {
22130    pub const ENCODED_LEN: usize = 255usize;
22131    pub const DEFAULT: Self = Self {
22132        sequence: 0_u16,
22133        target_system: 0_u8,
22134        target_component: 0_u8,
22135        length: 0_u8,
22136        first_message_offset: 0_u8,
22137        data: [0_u8; 249usize],
22138    };
22139    #[cfg(feature = "arbitrary")]
22140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22141        use arbitrary::{Arbitrary, Unstructured};
22142        let mut buf = [0u8; 1024];
22143        rng.fill_bytes(&mut buf);
22144        let mut unstructured = Unstructured::new(&buf);
22145        Self::arbitrary(&mut unstructured).unwrap_or_default()
22146    }
22147}
22148impl Default for LOGGING_DATA_DATA {
22149    fn default() -> Self {
22150        Self::DEFAULT.clone()
22151    }
22152}
22153impl MessageData for LOGGING_DATA_DATA {
22154    type Message = MavMessage;
22155    const ID: u32 = 266u32;
22156    const NAME: &'static str = "LOGGING_DATA";
22157    const EXTRA_CRC: u8 = 193u8;
22158    const ENCODED_LEN: usize = 255usize;
22159    fn deser(
22160        _version: MavlinkVersion,
22161        __input: &[u8],
22162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22163        let avail_len = __input.len();
22164        let mut payload_buf = [0; Self::ENCODED_LEN];
22165        let mut buf = if avail_len < Self::ENCODED_LEN {
22166            payload_buf[0..avail_len].copy_from_slice(__input);
22167            Bytes::new(&payload_buf)
22168        } else {
22169            Bytes::new(__input)
22170        };
22171        let mut __struct = Self::default();
22172        __struct.sequence = buf.get_u16_le();
22173        __struct.target_system = buf.get_u8();
22174        __struct.target_component = buf.get_u8();
22175        __struct.length = buf.get_u8();
22176        __struct.first_message_offset = buf.get_u8();
22177        for v in &mut __struct.data {
22178            let val = buf.get_u8();
22179            *v = val;
22180        }
22181        Ok(__struct)
22182    }
22183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22184        let mut __tmp = BytesMut::new(bytes);
22185        #[allow(clippy::absurd_extreme_comparisons)]
22186        #[allow(unused_comparisons)]
22187        if __tmp.remaining() < Self::ENCODED_LEN {
22188            panic!(
22189                "buffer is too small (need {} bytes, but got {})",
22190                Self::ENCODED_LEN,
22191                __tmp.remaining(),
22192            )
22193        }
22194        __tmp.put_u16_le(self.sequence);
22195        __tmp.put_u8(self.target_system);
22196        __tmp.put_u8(self.target_component);
22197        __tmp.put_u8(self.length);
22198        __tmp.put_u8(self.first_message_offset);
22199        for val in &self.data {
22200            __tmp.put_u8(*val);
22201        }
22202        if matches!(version, MavlinkVersion::V2) {
22203            let len = __tmp.len();
22204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22205        } else {
22206            __tmp.len()
22207        }
22208    }
22209}
22210#[doc = "id: 247"]
22211#[doc = "Information about a potential collision."]
22212#[derive(Debug, Clone, PartialEq)]
22213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22215pub struct COLLISION_DATA {
22216    #[doc = "Unique identifier, domain based on src field"]
22217    pub id: u32,
22218    #[doc = "Estimated time until collision occurs"]
22219    pub time_to_minimum_delta: f32,
22220    #[doc = "Closest vertical distance between vehicle and object"]
22221    pub altitude_minimum_delta: f32,
22222    #[doc = "Closest horizontal distance between vehicle and object"]
22223    pub horizontal_minimum_delta: f32,
22224    #[doc = "Collision data source"]
22225    pub src: MavCollisionSrc,
22226    #[doc = "Action that is being taken to avoid this collision"]
22227    pub action: MavCollisionAction,
22228    #[doc = "How concerned the aircraft is about this collision"]
22229    pub threat_level: MavCollisionThreatLevel,
22230}
22231impl COLLISION_DATA {
22232    pub const ENCODED_LEN: usize = 19usize;
22233    pub const DEFAULT: Self = Self {
22234        id: 0_u32,
22235        time_to_minimum_delta: 0.0_f32,
22236        altitude_minimum_delta: 0.0_f32,
22237        horizontal_minimum_delta: 0.0_f32,
22238        src: MavCollisionSrc::DEFAULT,
22239        action: MavCollisionAction::DEFAULT,
22240        threat_level: MavCollisionThreatLevel::DEFAULT,
22241    };
22242    #[cfg(feature = "arbitrary")]
22243    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22244        use arbitrary::{Arbitrary, Unstructured};
22245        let mut buf = [0u8; 1024];
22246        rng.fill_bytes(&mut buf);
22247        let mut unstructured = Unstructured::new(&buf);
22248        Self::arbitrary(&mut unstructured).unwrap_or_default()
22249    }
22250}
22251impl Default for COLLISION_DATA {
22252    fn default() -> Self {
22253        Self::DEFAULT.clone()
22254    }
22255}
22256impl MessageData for COLLISION_DATA {
22257    type Message = MavMessage;
22258    const ID: u32 = 247u32;
22259    const NAME: &'static str = "COLLISION";
22260    const EXTRA_CRC: u8 = 81u8;
22261    const ENCODED_LEN: usize = 19usize;
22262    fn deser(
22263        _version: MavlinkVersion,
22264        __input: &[u8],
22265    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22266        let avail_len = __input.len();
22267        let mut payload_buf = [0; Self::ENCODED_LEN];
22268        let mut buf = if avail_len < Self::ENCODED_LEN {
22269            payload_buf[0..avail_len].copy_from_slice(__input);
22270            Bytes::new(&payload_buf)
22271        } else {
22272            Bytes::new(__input)
22273        };
22274        let mut __struct = Self::default();
22275        __struct.id = buf.get_u32_le();
22276        __struct.time_to_minimum_delta = buf.get_f32_le();
22277        __struct.altitude_minimum_delta = buf.get_f32_le();
22278        __struct.horizontal_minimum_delta = buf.get_f32_le();
22279        let tmp = buf.get_u8();
22280        __struct.src =
22281            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22282                enum_type: "MavCollisionSrc",
22283                value: tmp as u32,
22284            })?;
22285        let tmp = buf.get_u8();
22286        __struct.action =
22287            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22288                enum_type: "MavCollisionAction",
22289                value: tmp as u32,
22290            })?;
22291        let tmp = buf.get_u8();
22292        __struct.threat_level =
22293            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22294                enum_type: "MavCollisionThreatLevel",
22295                value: tmp as u32,
22296            })?;
22297        Ok(__struct)
22298    }
22299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22300        let mut __tmp = BytesMut::new(bytes);
22301        #[allow(clippy::absurd_extreme_comparisons)]
22302        #[allow(unused_comparisons)]
22303        if __tmp.remaining() < Self::ENCODED_LEN {
22304            panic!(
22305                "buffer is too small (need {} bytes, but got {})",
22306                Self::ENCODED_LEN,
22307                __tmp.remaining(),
22308            )
22309        }
22310        __tmp.put_u32_le(self.id);
22311        __tmp.put_f32_le(self.time_to_minimum_delta);
22312        __tmp.put_f32_le(self.altitude_minimum_delta);
22313        __tmp.put_f32_le(self.horizontal_minimum_delta);
22314        __tmp.put_u8(self.src as u8);
22315        __tmp.put_u8(self.action as u8);
22316        __tmp.put_u8(self.threat_level as u8);
22317        if matches!(version, MavlinkVersion::V2) {
22318            let len = __tmp.len();
22319            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22320        } else {
22321            __tmp.len()
22322        }
22323    }
22324}
22325#[doc = "id: 287"]
22326#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
22327#[derive(Debug, Clone, PartialEq)]
22328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22330pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22331    #[doc = "High level gimbal manager flags to use."]
22332    pub flags: GimbalManagerFlags,
22333    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
22334    pub pitch: f32,
22335    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
22336    pub yaw: f32,
22337    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
22338    pub pitch_rate: f32,
22339    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
22340    pub yaw_rate: f32,
22341    #[doc = "System ID"]
22342    pub target_system: u8,
22343    #[doc = "Component ID"]
22344    pub target_component: u8,
22345    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
22346    pub gimbal_device_id: u8,
22347}
22348impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22349    pub const ENCODED_LEN: usize = 23usize;
22350    pub const DEFAULT: Self = Self {
22351        flags: GimbalManagerFlags::DEFAULT,
22352        pitch: 0.0_f32,
22353        yaw: 0.0_f32,
22354        pitch_rate: 0.0_f32,
22355        yaw_rate: 0.0_f32,
22356        target_system: 0_u8,
22357        target_component: 0_u8,
22358        gimbal_device_id: 0_u8,
22359    };
22360    #[cfg(feature = "arbitrary")]
22361    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22362        use arbitrary::{Arbitrary, Unstructured};
22363        let mut buf = [0u8; 1024];
22364        rng.fill_bytes(&mut buf);
22365        let mut unstructured = Unstructured::new(&buf);
22366        Self::arbitrary(&mut unstructured).unwrap_or_default()
22367    }
22368}
22369impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22370    fn default() -> Self {
22371        Self::DEFAULT.clone()
22372    }
22373}
22374impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22375    type Message = MavMessage;
22376    const ID: u32 = 287u32;
22377    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
22378    const EXTRA_CRC: u8 = 1u8;
22379    const ENCODED_LEN: usize = 23usize;
22380    fn deser(
22381        _version: MavlinkVersion,
22382        __input: &[u8],
22383    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22384        let avail_len = __input.len();
22385        let mut payload_buf = [0; Self::ENCODED_LEN];
22386        let mut buf = if avail_len < Self::ENCODED_LEN {
22387            payload_buf[0..avail_len].copy_from_slice(__input);
22388            Bytes::new(&payload_buf)
22389        } else {
22390            Bytes::new(__input)
22391        };
22392        let mut __struct = Self::default();
22393        let tmp = buf.get_u32_le();
22394        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
22395            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22396                flag_type: "GimbalManagerFlags",
22397                value: tmp as u32,
22398            })?;
22399        __struct.pitch = buf.get_f32_le();
22400        __struct.yaw = buf.get_f32_le();
22401        __struct.pitch_rate = buf.get_f32_le();
22402        __struct.yaw_rate = buf.get_f32_le();
22403        __struct.target_system = buf.get_u8();
22404        __struct.target_component = buf.get_u8();
22405        __struct.gimbal_device_id = buf.get_u8();
22406        Ok(__struct)
22407    }
22408    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22409        let mut __tmp = BytesMut::new(bytes);
22410        #[allow(clippy::absurd_extreme_comparisons)]
22411        #[allow(unused_comparisons)]
22412        if __tmp.remaining() < Self::ENCODED_LEN {
22413            panic!(
22414                "buffer is too small (need {} bytes, but got {})",
22415                Self::ENCODED_LEN,
22416                __tmp.remaining(),
22417            )
22418        }
22419        __tmp.put_u32_le(self.flags.bits());
22420        __tmp.put_f32_le(self.pitch);
22421        __tmp.put_f32_le(self.yaw);
22422        __tmp.put_f32_le(self.pitch_rate);
22423        __tmp.put_f32_le(self.yaw_rate);
22424        __tmp.put_u8(self.target_system);
22425        __tmp.put_u8(self.target_component);
22426        __tmp.put_u8(self.gimbal_device_id);
22427        if matches!(version, MavlinkVersion::V2) {
22428            let len = __tmp.len();
22429            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22430        } else {
22431            __tmp.len()
22432        }
22433    }
22434}
22435#[doc = "id: 286"]
22436#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
22437#[derive(Debug, Clone, PartialEq)]
22438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22440pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
22441    #[doc = "Timestamp (time since system boot)."]
22442    pub time_boot_us: u64,
22443    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
22444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22445    pub q: [f32; 4],
22446    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
22447    pub q_estimated_delay_us: u32,
22448    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
22449    pub vx: f32,
22450    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
22451    pub vy: f32,
22452    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
22453    pub vz: f32,
22454    #[doc = "Estimated delay of the speed data. 0 if unknown."]
22455    pub v_estimated_delay_us: u32,
22456    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
22457    pub feed_forward_angular_velocity_z: f32,
22458    #[doc = "Bitmap indicating which estimator outputs are valid."]
22459    pub estimator_status: EstimatorStatusFlags,
22460    #[doc = "System ID"]
22461    pub target_system: u8,
22462    #[doc = "Component ID"]
22463    pub target_component: u8,
22464    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
22465    pub landed_state: MavLandedState,
22466    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
22467    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22468    pub angular_velocity_z: f32,
22469}
22470impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
22471    pub const ENCODED_LEN: usize = 57usize;
22472    pub const DEFAULT: Self = Self {
22473        time_boot_us: 0_u64,
22474        q: [0.0_f32; 4usize],
22475        q_estimated_delay_us: 0_u32,
22476        vx: 0.0_f32,
22477        vy: 0.0_f32,
22478        vz: 0.0_f32,
22479        v_estimated_delay_us: 0_u32,
22480        feed_forward_angular_velocity_z: 0.0_f32,
22481        estimator_status: EstimatorStatusFlags::DEFAULT,
22482        target_system: 0_u8,
22483        target_component: 0_u8,
22484        landed_state: MavLandedState::DEFAULT,
22485        angular_velocity_z: 0.0_f32,
22486    };
22487    #[cfg(feature = "arbitrary")]
22488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22489        use arbitrary::{Arbitrary, Unstructured};
22490        let mut buf = [0u8; 1024];
22491        rng.fill_bytes(&mut buf);
22492        let mut unstructured = Unstructured::new(&buf);
22493        Self::arbitrary(&mut unstructured).unwrap_or_default()
22494    }
22495}
22496impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
22497    fn default() -> Self {
22498        Self::DEFAULT.clone()
22499    }
22500}
22501impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
22502    type Message = MavMessage;
22503    const ID: u32 = 286u32;
22504    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
22505    const EXTRA_CRC: u8 = 210u8;
22506    const ENCODED_LEN: usize = 57usize;
22507    fn deser(
22508        _version: MavlinkVersion,
22509        __input: &[u8],
22510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22511        let avail_len = __input.len();
22512        let mut payload_buf = [0; Self::ENCODED_LEN];
22513        let mut buf = if avail_len < Self::ENCODED_LEN {
22514            payload_buf[0..avail_len].copy_from_slice(__input);
22515            Bytes::new(&payload_buf)
22516        } else {
22517            Bytes::new(__input)
22518        };
22519        let mut __struct = Self::default();
22520        __struct.time_boot_us = buf.get_u64_le();
22521        for v in &mut __struct.q {
22522            let val = buf.get_f32_le();
22523            *v = val;
22524        }
22525        __struct.q_estimated_delay_us = buf.get_u32_le();
22526        __struct.vx = buf.get_f32_le();
22527        __struct.vy = buf.get_f32_le();
22528        __struct.vz = buf.get_f32_le();
22529        __struct.v_estimated_delay_us = buf.get_u32_le();
22530        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
22531        let tmp = buf.get_u16_le();
22532        __struct.estimator_status = EstimatorStatusFlags::from_bits(
22533            tmp & EstimatorStatusFlags::all().bits(),
22534        )
22535        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22536            flag_type: "EstimatorStatusFlags",
22537            value: tmp as u32,
22538        })?;
22539        __struct.target_system = buf.get_u8();
22540        __struct.target_component = buf.get_u8();
22541        let tmp = buf.get_u8();
22542        __struct.landed_state =
22543            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22544                enum_type: "MavLandedState",
22545                value: tmp as u32,
22546            })?;
22547        __struct.angular_velocity_z = buf.get_f32_le();
22548        Ok(__struct)
22549    }
22550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22551        let mut __tmp = BytesMut::new(bytes);
22552        #[allow(clippy::absurd_extreme_comparisons)]
22553        #[allow(unused_comparisons)]
22554        if __tmp.remaining() < Self::ENCODED_LEN {
22555            panic!(
22556                "buffer is too small (need {} bytes, but got {})",
22557                Self::ENCODED_LEN,
22558                __tmp.remaining(),
22559            )
22560        }
22561        __tmp.put_u64_le(self.time_boot_us);
22562        for val in &self.q {
22563            __tmp.put_f32_le(*val);
22564        }
22565        __tmp.put_u32_le(self.q_estimated_delay_us);
22566        __tmp.put_f32_le(self.vx);
22567        __tmp.put_f32_le(self.vy);
22568        __tmp.put_f32_le(self.vz);
22569        __tmp.put_u32_le(self.v_estimated_delay_us);
22570        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
22571        __tmp.put_u16_le(self.estimator_status.bits());
22572        __tmp.put_u8(self.target_system);
22573        __tmp.put_u8(self.target_component);
22574        __tmp.put_u8(self.landed_state as u8);
22575        __tmp.put_f32_le(self.angular_velocity_z);
22576        if matches!(version, MavlinkVersion::V2) {
22577            let len = __tmp.len();
22578            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22579        } else {
22580            __tmp.len()
22581        }
22582    }
22583}
22584#[doc = "id: 8"]
22585#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
22586#[derive(Debug, Clone, PartialEq)]
22587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22588#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22589pub struct LINK_NODE_STATUS_DATA {
22590    #[doc = "Timestamp (time since system boot)."]
22591    pub timestamp: u64,
22592    #[doc = "Transmit rate"]
22593    pub tx_rate: u32,
22594    #[doc = "Receive rate"]
22595    pub rx_rate: u32,
22596    #[doc = "Messages sent"]
22597    pub messages_sent: u32,
22598    #[doc = "Messages received (estimated from counting seq)"]
22599    pub messages_received: u32,
22600    #[doc = "Messages lost (estimated from counting seq)"]
22601    pub messages_lost: u32,
22602    #[doc = "Number of bytes that could not be parsed correctly."]
22603    pub rx_parse_err: u16,
22604    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
22605    pub tx_overflows: u16,
22606    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
22607    pub rx_overflows: u16,
22608    #[doc = "Remaining free transmit buffer space"]
22609    pub tx_buf: u8,
22610    #[doc = "Remaining free receive buffer space"]
22611    pub rx_buf: u8,
22612}
22613impl LINK_NODE_STATUS_DATA {
22614    pub const ENCODED_LEN: usize = 36usize;
22615    pub const DEFAULT: Self = Self {
22616        timestamp: 0_u64,
22617        tx_rate: 0_u32,
22618        rx_rate: 0_u32,
22619        messages_sent: 0_u32,
22620        messages_received: 0_u32,
22621        messages_lost: 0_u32,
22622        rx_parse_err: 0_u16,
22623        tx_overflows: 0_u16,
22624        rx_overflows: 0_u16,
22625        tx_buf: 0_u8,
22626        rx_buf: 0_u8,
22627    };
22628    #[cfg(feature = "arbitrary")]
22629    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22630        use arbitrary::{Arbitrary, Unstructured};
22631        let mut buf = [0u8; 1024];
22632        rng.fill_bytes(&mut buf);
22633        let mut unstructured = Unstructured::new(&buf);
22634        Self::arbitrary(&mut unstructured).unwrap_or_default()
22635    }
22636}
22637impl Default for LINK_NODE_STATUS_DATA {
22638    fn default() -> Self {
22639        Self::DEFAULT.clone()
22640    }
22641}
22642impl MessageData for LINK_NODE_STATUS_DATA {
22643    type Message = MavMessage;
22644    const ID: u32 = 8u32;
22645    const NAME: &'static str = "LINK_NODE_STATUS";
22646    const EXTRA_CRC: u8 = 117u8;
22647    const ENCODED_LEN: usize = 36usize;
22648    fn deser(
22649        _version: MavlinkVersion,
22650        __input: &[u8],
22651    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22652        let avail_len = __input.len();
22653        let mut payload_buf = [0; Self::ENCODED_LEN];
22654        let mut buf = if avail_len < Self::ENCODED_LEN {
22655            payload_buf[0..avail_len].copy_from_slice(__input);
22656            Bytes::new(&payload_buf)
22657        } else {
22658            Bytes::new(__input)
22659        };
22660        let mut __struct = Self::default();
22661        __struct.timestamp = buf.get_u64_le();
22662        __struct.tx_rate = buf.get_u32_le();
22663        __struct.rx_rate = buf.get_u32_le();
22664        __struct.messages_sent = buf.get_u32_le();
22665        __struct.messages_received = buf.get_u32_le();
22666        __struct.messages_lost = buf.get_u32_le();
22667        __struct.rx_parse_err = buf.get_u16_le();
22668        __struct.tx_overflows = buf.get_u16_le();
22669        __struct.rx_overflows = buf.get_u16_le();
22670        __struct.tx_buf = buf.get_u8();
22671        __struct.rx_buf = buf.get_u8();
22672        Ok(__struct)
22673    }
22674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22675        let mut __tmp = BytesMut::new(bytes);
22676        #[allow(clippy::absurd_extreme_comparisons)]
22677        #[allow(unused_comparisons)]
22678        if __tmp.remaining() < Self::ENCODED_LEN {
22679            panic!(
22680                "buffer is too small (need {} bytes, but got {})",
22681                Self::ENCODED_LEN,
22682                __tmp.remaining(),
22683            )
22684        }
22685        __tmp.put_u64_le(self.timestamp);
22686        __tmp.put_u32_le(self.tx_rate);
22687        __tmp.put_u32_le(self.rx_rate);
22688        __tmp.put_u32_le(self.messages_sent);
22689        __tmp.put_u32_le(self.messages_received);
22690        __tmp.put_u32_le(self.messages_lost);
22691        __tmp.put_u16_le(self.rx_parse_err);
22692        __tmp.put_u16_le(self.tx_overflows);
22693        __tmp.put_u16_le(self.rx_overflows);
22694        __tmp.put_u8(self.tx_buf);
22695        __tmp.put_u8(self.rx_buf);
22696        if matches!(version, MavlinkVersion::V2) {
22697            let len = __tmp.len();
22698            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22699        } else {
22700            __tmp.len()
22701        }
22702    }
22703}
22704#[doc = "id: 106"]
22705#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22706#[derive(Debug, Clone, PartialEq)]
22707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22709pub struct OPTICAL_FLOW_RAD_DATA {
22710    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22711    pub time_usec: u64,
22712    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22713    pub integration_time_us: u32,
22714    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22715    pub integrated_x: f32,
22716    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22717    pub integrated_y: f32,
22718    #[doc = "RH rotation around X axis"]
22719    pub integrated_xgyro: f32,
22720    #[doc = "RH rotation around Y axis"]
22721    pub integrated_ygyro: f32,
22722    #[doc = "RH rotation around Z axis"]
22723    pub integrated_zgyro: f32,
22724    #[doc = "Time since the distance was sampled."]
22725    pub time_delta_distance_us: u32,
22726    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22727    pub distance: f32,
22728    #[doc = "Temperature"]
22729    pub temperature: i16,
22730    #[doc = "Sensor ID"]
22731    pub sensor_id: u8,
22732    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22733    pub quality: u8,
22734}
22735impl OPTICAL_FLOW_RAD_DATA {
22736    pub const ENCODED_LEN: usize = 44usize;
22737    pub const DEFAULT: Self = Self {
22738        time_usec: 0_u64,
22739        integration_time_us: 0_u32,
22740        integrated_x: 0.0_f32,
22741        integrated_y: 0.0_f32,
22742        integrated_xgyro: 0.0_f32,
22743        integrated_ygyro: 0.0_f32,
22744        integrated_zgyro: 0.0_f32,
22745        time_delta_distance_us: 0_u32,
22746        distance: 0.0_f32,
22747        temperature: 0_i16,
22748        sensor_id: 0_u8,
22749        quality: 0_u8,
22750    };
22751    #[cfg(feature = "arbitrary")]
22752    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22753        use arbitrary::{Arbitrary, Unstructured};
22754        let mut buf = [0u8; 1024];
22755        rng.fill_bytes(&mut buf);
22756        let mut unstructured = Unstructured::new(&buf);
22757        Self::arbitrary(&mut unstructured).unwrap_or_default()
22758    }
22759}
22760impl Default for OPTICAL_FLOW_RAD_DATA {
22761    fn default() -> Self {
22762        Self::DEFAULT.clone()
22763    }
22764}
22765impl MessageData for OPTICAL_FLOW_RAD_DATA {
22766    type Message = MavMessage;
22767    const ID: u32 = 106u32;
22768    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22769    const EXTRA_CRC: u8 = 138u8;
22770    const ENCODED_LEN: usize = 44usize;
22771    fn deser(
22772        _version: MavlinkVersion,
22773        __input: &[u8],
22774    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22775        let avail_len = __input.len();
22776        let mut payload_buf = [0; Self::ENCODED_LEN];
22777        let mut buf = if avail_len < Self::ENCODED_LEN {
22778            payload_buf[0..avail_len].copy_from_slice(__input);
22779            Bytes::new(&payload_buf)
22780        } else {
22781            Bytes::new(__input)
22782        };
22783        let mut __struct = Self::default();
22784        __struct.time_usec = buf.get_u64_le();
22785        __struct.integration_time_us = buf.get_u32_le();
22786        __struct.integrated_x = buf.get_f32_le();
22787        __struct.integrated_y = buf.get_f32_le();
22788        __struct.integrated_xgyro = buf.get_f32_le();
22789        __struct.integrated_ygyro = buf.get_f32_le();
22790        __struct.integrated_zgyro = buf.get_f32_le();
22791        __struct.time_delta_distance_us = buf.get_u32_le();
22792        __struct.distance = buf.get_f32_le();
22793        __struct.temperature = buf.get_i16_le();
22794        __struct.sensor_id = buf.get_u8();
22795        __struct.quality = buf.get_u8();
22796        Ok(__struct)
22797    }
22798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22799        let mut __tmp = BytesMut::new(bytes);
22800        #[allow(clippy::absurd_extreme_comparisons)]
22801        #[allow(unused_comparisons)]
22802        if __tmp.remaining() < Self::ENCODED_LEN {
22803            panic!(
22804                "buffer is too small (need {} bytes, but got {})",
22805                Self::ENCODED_LEN,
22806                __tmp.remaining(),
22807            )
22808        }
22809        __tmp.put_u64_le(self.time_usec);
22810        __tmp.put_u32_le(self.integration_time_us);
22811        __tmp.put_f32_le(self.integrated_x);
22812        __tmp.put_f32_le(self.integrated_y);
22813        __tmp.put_f32_le(self.integrated_xgyro);
22814        __tmp.put_f32_le(self.integrated_ygyro);
22815        __tmp.put_f32_le(self.integrated_zgyro);
22816        __tmp.put_u32_le(self.time_delta_distance_us);
22817        __tmp.put_f32_le(self.distance);
22818        __tmp.put_i16_le(self.temperature);
22819        __tmp.put_u8(self.sensor_id);
22820        __tmp.put_u8(self.quality);
22821        if matches!(version, MavlinkVersion::V2) {
22822            let len = __tmp.len();
22823            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22824        } else {
22825            __tmp.len()
22826        }
22827    }
22828}
22829#[doc = "id: 118"]
22830#[doc = "Reply to LOG_REQUEST_LIST."]
22831#[derive(Debug, Clone, PartialEq)]
22832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22834pub struct LOG_ENTRY_DATA {
22835    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
22836    pub time_utc: u32,
22837    #[doc = "Size of the log (may be approximate)"]
22838    pub size: u32,
22839    #[doc = "Log id"]
22840    pub id: u16,
22841    #[doc = "Total number of logs"]
22842    pub num_logs: u16,
22843    #[doc = "High log number"]
22844    pub last_log_num: u16,
22845}
22846impl LOG_ENTRY_DATA {
22847    pub const ENCODED_LEN: usize = 14usize;
22848    pub const DEFAULT: Self = Self {
22849        time_utc: 0_u32,
22850        size: 0_u32,
22851        id: 0_u16,
22852        num_logs: 0_u16,
22853        last_log_num: 0_u16,
22854    };
22855    #[cfg(feature = "arbitrary")]
22856    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22857        use arbitrary::{Arbitrary, Unstructured};
22858        let mut buf = [0u8; 1024];
22859        rng.fill_bytes(&mut buf);
22860        let mut unstructured = Unstructured::new(&buf);
22861        Self::arbitrary(&mut unstructured).unwrap_or_default()
22862    }
22863}
22864impl Default for LOG_ENTRY_DATA {
22865    fn default() -> Self {
22866        Self::DEFAULT.clone()
22867    }
22868}
22869impl MessageData for LOG_ENTRY_DATA {
22870    type Message = MavMessage;
22871    const ID: u32 = 118u32;
22872    const NAME: &'static str = "LOG_ENTRY";
22873    const EXTRA_CRC: u8 = 56u8;
22874    const ENCODED_LEN: usize = 14usize;
22875    fn deser(
22876        _version: MavlinkVersion,
22877        __input: &[u8],
22878    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22879        let avail_len = __input.len();
22880        let mut payload_buf = [0; Self::ENCODED_LEN];
22881        let mut buf = if avail_len < Self::ENCODED_LEN {
22882            payload_buf[0..avail_len].copy_from_slice(__input);
22883            Bytes::new(&payload_buf)
22884        } else {
22885            Bytes::new(__input)
22886        };
22887        let mut __struct = Self::default();
22888        __struct.time_utc = buf.get_u32_le();
22889        __struct.size = buf.get_u32_le();
22890        __struct.id = buf.get_u16_le();
22891        __struct.num_logs = buf.get_u16_le();
22892        __struct.last_log_num = buf.get_u16_le();
22893        Ok(__struct)
22894    }
22895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22896        let mut __tmp = BytesMut::new(bytes);
22897        #[allow(clippy::absurd_extreme_comparisons)]
22898        #[allow(unused_comparisons)]
22899        if __tmp.remaining() < Self::ENCODED_LEN {
22900            panic!(
22901                "buffer is too small (need {} bytes, but got {})",
22902                Self::ENCODED_LEN,
22903                __tmp.remaining(),
22904            )
22905        }
22906        __tmp.put_u32_le(self.time_utc);
22907        __tmp.put_u32_le(self.size);
22908        __tmp.put_u16_le(self.id);
22909        __tmp.put_u16_le(self.num_logs);
22910        __tmp.put_u16_le(self.last_log_num);
22911        if matches!(version, MavlinkVersion::V2) {
22912            let len = __tmp.len();
22913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22914        } else {
22915            __tmp.len()
22916        }
22917    }
22918}
22919#[doc = "id: 334"]
22920#[doc = "Report current used cellular network status."]
22921#[derive(Debug, Clone, PartialEq)]
22922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22924pub struct CELLULAR_STATUS_DATA {
22925    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
22926    pub mcc: u16,
22927    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
22928    pub mnc: u16,
22929    #[doc = "Location area code. If unknown, set to 0"]
22930    pub lac: u16,
22931    #[doc = "Cellular modem status"]
22932    pub status: CellularStatusFlag,
22933    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
22934    pub failure_reason: CellularNetworkFailedReason,
22935    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
22936    pub mavtype: CellularNetworkRadioType,
22937    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
22938    pub quality: u8,
22939}
22940impl CELLULAR_STATUS_DATA {
22941    pub const ENCODED_LEN: usize = 10usize;
22942    pub const DEFAULT: Self = Self {
22943        mcc: 0_u16,
22944        mnc: 0_u16,
22945        lac: 0_u16,
22946        status: CellularStatusFlag::DEFAULT,
22947        failure_reason: CellularNetworkFailedReason::DEFAULT,
22948        mavtype: CellularNetworkRadioType::DEFAULT,
22949        quality: 0_u8,
22950    };
22951    #[cfg(feature = "arbitrary")]
22952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22953        use arbitrary::{Arbitrary, Unstructured};
22954        let mut buf = [0u8; 1024];
22955        rng.fill_bytes(&mut buf);
22956        let mut unstructured = Unstructured::new(&buf);
22957        Self::arbitrary(&mut unstructured).unwrap_or_default()
22958    }
22959}
22960impl Default for CELLULAR_STATUS_DATA {
22961    fn default() -> Self {
22962        Self::DEFAULT.clone()
22963    }
22964}
22965impl MessageData for CELLULAR_STATUS_DATA {
22966    type Message = MavMessage;
22967    const ID: u32 = 334u32;
22968    const NAME: &'static str = "CELLULAR_STATUS";
22969    const EXTRA_CRC: u8 = 72u8;
22970    const ENCODED_LEN: usize = 10usize;
22971    fn deser(
22972        _version: MavlinkVersion,
22973        __input: &[u8],
22974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22975        let avail_len = __input.len();
22976        let mut payload_buf = [0; Self::ENCODED_LEN];
22977        let mut buf = if avail_len < Self::ENCODED_LEN {
22978            payload_buf[0..avail_len].copy_from_slice(__input);
22979            Bytes::new(&payload_buf)
22980        } else {
22981            Bytes::new(__input)
22982        };
22983        let mut __struct = Self::default();
22984        __struct.mcc = buf.get_u16_le();
22985        __struct.mnc = buf.get_u16_le();
22986        __struct.lac = buf.get_u16_le();
22987        let tmp = buf.get_u8();
22988        __struct.status =
22989            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22990                enum_type: "CellularStatusFlag",
22991                value: tmp as u32,
22992            })?;
22993        let tmp = buf.get_u8();
22994        __struct.failure_reason =
22995            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22996                enum_type: "CellularNetworkFailedReason",
22997                value: tmp as u32,
22998            })?;
22999        let tmp = buf.get_u8();
23000        __struct.mavtype =
23001            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23002                enum_type: "CellularNetworkRadioType",
23003                value: tmp as u32,
23004            })?;
23005        __struct.quality = buf.get_u8();
23006        Ok(__struct)
23007    }
23008    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23009        let mut __tmp = BytesMut::new(bytes);
23010        #[allow(clippy::absurd_extreme_comparisons)]
23011        #[allow(unused_comparisons)]
23012        if __tmp.remaining() < Self::ENCODED_LEN {
23013            panic!(
23014                "buffer is too small (need {} bytes, but got {})",
23015                Self::ENCODED_LEN,
23016                __tmp.remaining(),
23017            )
23018        }
23019        __tmp.put_u16_le(self.mcc);
23020        __tmp.put_u16_le(self.mnc);
23021        __tmp.put_u16_le(self.lac);
23022        __tmp.put_u8(self.status as u8);
23023        __tmp.put_u8(self.failure_reason as u8);
23024        __tmp.put_u8(self.mavtype as u8);
23025        __tmp.put_u8(self.quality);
23026        if matches!(version, MavlinkVersion::V2) {
23027            let len = __tmp.len();
23028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23029        } else {
23030            __tmp.len()
23031        }
23032    }
23033}
23034#[doc = "id: 261"]
23035#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
23036#[derive(Debug, Clone, PartialEq)]
23037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23039pub struct STORAGE_INFORMATION_DATA {
23040    #[doc = "Timestamp (time since system boot)."]
23041    pub time_boot_ms: u32,
23042    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
23043    pub total_capacity: f32,
23044    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
23045    pub used_capacity: f32,
23046    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
23047    pub available_capacity: f32,
23048    #[doc = "Read speed."]
23049    pub read_speed: f32,
23050    #[doc = "Write speed."]
23051    pub write_speed: f32,
23052    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
23053    pub storage_id: u8,
23054    #[doc = "Number of storage devices"]
23055    pub storage_count: u8,
23056    #[doc = "Status of storage"]
23057    pub status: StorageStatus,
23058    #[doc = "Type of storage"]
23059    #[cfg_attr(feature = "serde", serde(default))]
23060    pub mavtype: StorageType,
23061    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
23062    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23063    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23064    pub name: [u8; 32],
23065    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
23066    #[cfg_attr(feature = "serde", serde(default))]
23067    pub storage_usage: StorageUsageFlag,
23068}
23069impl STORAGE_INFORMATION_DATA {
23070    pub const ENCODED_LEN: usize = 61usize;
23071    pub const DEFAULT: Self = Self {
23072        time_boot_ms: 0_u32,
23073        total_capacity: 0.0_f32,
23074        used_capacity: 0.0_f32,
23075        available_capacity: 0.0_f32,
23076        read_speed: 0.0_f32,
23077        write_speed: 0.0_f32,
23078        storage_id: 0_u8,
23079        storage_count: 0_u8,
23080        status: StorageStatus::DEFAULT,
23081        mavtype: StorageType::DEFAULT,
23082        name: [0_u8; 32usize],
23083        storage_usage: StorageUsageFlag::DEFAULT,
23084    };
23085    #[cfg(feature = "arbitrary")]
23086    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23087        use arbitrary::{Arbitrary, Unstructured};
23088        let mut buf = [0u8; 1024];
23089        rng.fill_bytes(&mut buf);
23090        let mut unstructured = Unstructured::new(&buf);
23091        Self::arbitrary(&mut unstructured).unwrap_or_default()
23092    }
23093}
23094impl Default for STORAGE_INFORMATION_DATA {
23095    fn default() -> Self {
23096        Self::DEFAULT.clone()
23097    }
23098}
23099impl MessageData for STORAGE_INFORMATION_DATA {
23100    type Message = MavMessage;
23101    const ID: u32 = 261u32;
23102    const NAME: &'static str = "STORAGE_INFORMATION";
23103    const EXTRA_CRC: u8 = 179u8;
23104    const ENCODED_LEN: usize = 61usize;
23105    fn deser(
23106        _version: MavlinkVersion,
23107        __input: &[u8],
23108    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23109        let avail_len = __input.len();
23110        let mut payload_buf = [0; Self::ENCODED_LEN];
23111        let mut buf = if avail_len < Self::ENCODED_LEN {
23112            payload_buf[0..avail_len].copy_from_slice(__input);
23113            Bytes::new(&payload_buf)
23114        } else {
23115            Bytes::new(__input)
23116        };
23117        let mut __struct = Self::default();
23118        __struct.time_boot_ms = buf.get_u32_le();
23119        __struct.total_capacity = buf.get_f32_le();
23120        __struct.used_capacity = buf.get_f32_le();
23121        __struct.available_capacity = buf.get_f32_le();
23122        __struct.read_speed = buf.get_f32_le();
23123        __struct.write_speed = buf.get_f32_le();
23124        __struct.storage_id = buf.get_u8();
23125        __struct.storage_count = buf.get_u8();
23126        let tmp = buf.get_u8();
23127        __struct.status =
23128            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23129                enum_type: "StorageStatus",
23130                value: tmp as u32,
23131            })?;
23132        let tmp = buf.get_u8();
23133        __struct.mavtype =
23134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23135                enum_type: "StorageType",
23136                value: tmp as u32,
23137            })?;
23138        for v in &mut __struct.name {
23139            let val = buf.get_u8();
23140            *v = val;
23141        }
23142        let tmp = buf.get_u8();
23143        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
23144            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23145                flag_type: "StorageUsageFlag",
23146                value: tmp as u32,
23147            })?;
23148        Ok(__struct)
23149    }
23150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23151        let mut __tmp = BytesMut::new(bytes);
23152        #[allow(clippy::absurd_extreme_comparisons)]
23153        #[allow(unused_comparisons)]
23154        if __tmp.remaining() < Self::ENCODED_LEN {
23155            panic!(
23156                "buffer is too small (need {} bytes, but got {})",
23157                Self::ENCODED_LEN,
23158                __tmp.remaining(),
23159            )
23160        }
23161        __tmp.put_u32_le(self.time_boot_ms);
23162        __tmp.put_f32_le(self.total_capacity);
23163        __tmp.put_f32_le(self.used_capacity);
23164        __tmp.put_f32_le(self.available_capacity);
23165        __tmp.put_f32_le(self.read_speed);
23166        __tmp.put_f32_le(self.write_speed);
23167        __tmp.put_u8(self.storage_id);
23168        __tmp.put_u8(self.storage_count);
23169        __tmp.put_u8(self.status as u8);
23170        __tmp.put_u8(self.mavtype as u8);
23171        for val in &self.name {
23172            __tmp.put_u8(*val);
23173        }
23174        __tmp.put_u8(self.storage_usage.bits());
23175        if matches!(version, MavlinkVersion::V2) {
23176            let len = __tmp.len();
23177            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23178        } else {
23179            __tmp.len()
23180        }
23181    }
23182}
23183#[doc = "id: 133"]
23184#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
23185#[derive(Debug, Clone, PartialEq)]
23186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23188pub struct TERRAIN_REQUEST_DATA {
23189    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
23190    pub mask: u64,
23191    #[doc = "Latitude of SW corner of first grid"]
23192    pub lat: i32,
23193    #[doc = "Longitude of SW corner of first grid"]
23194    pub lon: i32,
23195    #[doc = "Grid spacing"]
23196    pub grid_spacing: u16,
23197}
23198impl TERRAIN_REQUEST_DATA {
23199    pub const ENCODED_LEN: usize = 18usize;
23200    pub const DEFAULT: Self = Self {
23201        mask: 0_u64,
23202        lat: 0_i32,
23203        lon: 0_i32,
23204        grid_spacing: 0_u16,
23205    };
23206    #[cfg(feature = "arbitrary")]
23207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23208        use arbitrary::{Arbitrary, Unstructured};
23209        let mut buf = [0u8; 1024];
23210        rng.fill_bytes(&mut buf);
23211        let mut unstructured = Unstructured::new(&buf);
23212        Self::arbitrary(&mut unstructured).unwrap_or_default()
23213    }
23214}
23215impl Default for TERRAIN_REQUEST_DATA {
23216    fn default() -> Self {
23217        Self::DEFAULT.clone()
23218    }
23219}
23220impl MessageData for TERRAIN_REQUEST_DATA {
23221    type Message = MavMessage;
23222    const ID: u32 = 133u32;
23223    const NAME: &'static str = "TERRAIN_REQUEST";
23224    const EXTRA_CRC: u8 = 6u8;
23225    const ENCODED_LEN: usize = 18usize;
23226    fn deser(
23227        _version: MavlinkVersion,
23228        __input: &[u8],
23229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23230        let avail_len = __input.len();
23231        let mut payload_buf = [0; Self::ENCODED_LEN];
23232        let mut buf = if avail_len < Self::ENCODED_LEN {
23233            payload_buf[0..avail_len].copy_from_slice(__input);
23234            Bytes::new(&payload_buf)
23235        } else {
23236            Bytes::new(__input)
23237        };
23238        let mut __struct = Self::default();
23239        __struct.mask = buf.get_u64_le();
23240        __struct.lat = buf.get_i32_le();
23241        __struct.lon = buf.get_i32_le();
23242        __struct.grid_spacing = buf.get_u16_le();
23243        Ok(__struct)
23244    }
23245    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23246        let mut __tmp = BytesMut::new(bytes);
23247        #[allow(clippy::absurd_extreme_comparisons)]
23248        #[allow(unused_comparisons)]
23249        if __tmp.remaining() < Self::ENCODED_LEN {
23250            panic!(
23251                "buffer is too small (need {} bytes, but got {})",
23252                Self::ENCODED_LEN,
23253                __tmp.remaining(),
23254            )
23255        }
23256        __tmp.put_u64_le(self.mask);
23257        __tmp.put_i32_le(self.lat);
23258        __tmp.put_i32_le(self.lon);
23259        __tmp.put_u16_le(self.grid_spacing);
23260        if matches!(version, MavlinkVersion::V2) {
23261            let len = __tmp.len();
23262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23263        } else {
23264            __tmp.len()
23265        }
23266    }
23267}
23268#[doc = "id: 41"]
23269#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
23270#[derive(Debug, Clone, PartialEq)]
23271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23273pub struct MISSION_SET_CURRENT_DATA {
23274    #[doc = "Sequence"]
23275    pub seq: u16,
23276    #[doc = "System ID"]
23277    pub target_system: u8,
23278    #[doc = "Component ID"]
23279    pub target_component: u8,
23280}
23281impl MISSION_SET_CURRENT_DATA {
23282    pub const ENCODED_LEN: usize = 4usize;
23283    pub const DEFAULT: Self = Self {
23284        seq: 0_u16,
23285        target_system: 0_u8,
23286        target_component: 0_u8,
23287    };
23288    #[cfg(feature = "arbitrary")]
23289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23290        use arbitrary::{Arbitrary, Unstructured};
23291        let mut buf = [0u8; 1024];
23292        rng.fill_bytes(&mut buf);
23293        let mut unstructured = Unstructured::new(&buf);
23294        Self::arbitrary(&mut unstructured).unwrap_or_default()
23295    }
23296}
23297impl Default for MISSION_SET_CURRENT_DATA {
23298    fn default() -> Self {
23299        Self::DEFAULT.clone()
23300    }
23301}
23302impl MessageData for MISSION_SET_CURRENT_DATA {
23303    type Message = MavMessage;
23304    const ID: u32 = 41u32;
23305    const NAME: &'static str = "MISSION_SET_CURRENT";
23306    const EXTRA_CRC: u8 = 28u8;
23307    const ENCODED_LEN: usize = 4usize;
23308    fn deser(
23309        _version: MavlinkVersion,
23310        __input: &[u8],
23311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23312        let avail_len = __input.len();
23313        let mut payload_buf = [0; Self::ENCODED_LEN];
23314        let mut buf = if avail_len < Self::ENCODED_LEN {
23315            payload_buf[0..avail_len].copy_from_slice(__input);
23316            Bytes::new(&payload_buf)
23317        } else {
23318            Bytes::new(__input)
23319        };
23320        let mut __struct = Self::default();
23321        __struct.seq = buf.get_u16_le();
23322        __struct.target_system = buf.get_u8();
23323        __struct.target_component = buf.get_u8();
23324        Ok(__struct)
23325    }
23326    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23327        let mut __tmp = BytesMut::new(bytes);
23328        #[allow(clippy::absurd_extreme_comparisons)]
23329        #[allow(unused_comparisons)]
23330        if __tmp.remaining() < Self::ENCODED_LEN {
23331            panic!(
23332                "buffer is too small (need {} bytes, but got {})",
23333                Self::ENCODED_LEN,
23334                __tmp.remaining(),
23335            )
23336        }
23337        __tmp.put_u16_le(self.seq);
23338        __tmp.put_u8(self.target_system);
23339        __tmp.put_u8(self.target_component);
23340        if matches!(version, MavlinkVersion::V2) {
23341            let len = __tmp.len();
23342            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23343        } else {
23344            __tmp.len()
23345        }
23346    }
23347}
23348#[doc = "id: 117"]
23349#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
23350#[derive(Debug, Clone, PartialEq)]
23351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23353pub struct LOG_REQUEST_LIST_DATA {
23354    #[doc = "First log id (0 for first available)"]
23355    pub start: u16,
23356    #[doc = "Last log id (0xffff for last available)"]
23357    pub end: u16,
23358    #[doc = "System ID"]
23359    pub target_system: u8,
23360    #[doc = "Component ID"]
23361    pub target_component: u8,
23362}
23363impl LOG_REQUEST_LIST_DATA {
23364    pub const ENCODED_LEN: usize = 6usize;
23365    pub const DEFAULT: Self = Self {
23366        start: 0_u16,
23367        end: 0_u16,
23368        target_system: 0_u8,
23369        target_component: 0_u8,
23370    };
23371    #[cfg(feature = "arbitrary")]
23372    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23373        use arbitrary::{Arbitrary, Unstructured};
23374        let mut buf = [0u8; 1024];
23375        rng.fill_bytes(&mut buf);
23376        let mut unstructured = Unstructured::new(&buf);
23377        Self::arbitrary(&mut unstructured).unwrap_or_default()
23378    }
23379}
23380impl Default for LOG_REQUEST_LIST_DATA {
23381    fn default() -> Self {
23382        Self::DEFAULT.clone()
23383    }
23384}
23385impl MessageData for LOG_REQUEST_LIST_DATA {
23386    type Message = MavMessage;
23387    const ID: u32 = 117u32;
23388    const NAME: &'static str = "LOG_REQUEST_LIST";
23389    const EXTRA_CRC: u8 = 128u8;
23390    const ENCODED_LEN: usize = 6usize;
23391    fn deser(
23392        _version: MavlinkVersion,
23393        __input: &[u8],
23394    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23395        let avail_len = __input.len();
23396        let mut payload_buf = [0; Self::ENCODED_LEN];
23397        let mut buf = if avail_len < Self::ENCODED_LEN {
23398            payload_buf[0..avail_len].copy_from_slice(__input);
23399            Bytes::new(&payload_buf)
23400        } else {
23401            Bytes::new(__input)
23402        };
23403        let mut __struct = Self::default();
23404        __struct.start = buf.get_u16_le();
23405        __struct.end = buf.get_u16_le();
23406        __struct.target_system = buf.get_u8();
23407        __struct.target_component = buf.get_u8();
23408        Ok(__struct)
23409    }
23410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23411        let mut __tmp = BytesMut::new(bytes);
23412        #[allow(clippy::absurd_extreme_comparisons)]
23413        #[allow(unused_comparisons)]
23414        if __tmp.remaining() < Self::ENCODED_LEN {
23415            panic!(
23416                "buffer is too small (need {} bytes, but got {})",
23417                Self::ENCODED_LEN,
23418                __tmp.remaining(),
23419            )
23420        }
23421        __tmp.put_u16_le(self.start);
23422        __tmp.put_u16_le(self.end);
23423        __tmp.put_u8(self.target_system);
23424        __tmp.put_u8(self.target_component);
23425        if matches!(version, MavlinkVersion::V2) {
23426            let len = __tmp.len();
23427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23428        } else {
23429            __tmp.len()
23430        }
23431    }
23432}
23433#[doc = "id: 290"]
23434#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
23435#[derive(Debug, Clone, PartialEq)]
23436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23438pub struct ESC_INFO_DATA {
23439    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
23440    pub time_usec: u64,
23441    #[doc = "Number of reported errors by each ESC since boot."]
23442    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23443    pub error_count: [u32; 4],
23444    #[doc = "Counter of data packets received."]
23445    pub counter: u16,
23446    #[doc = "Bitmap of ESC failure flags."]
23447    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23448    pub failure_flags: [u16; 4],
23449    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
23450    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23451    pub temperature: [i16; 4],
23452    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
23453    pub index: u8,
23454    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
23455    pub count: u8,
23456    #[doc = "Connection type protocol for all ESC."]
23457    pub connection_type: EscConnectionType,
23458    #[doc = "Information regarding online/offline status of each ESC."]
23459    pub info: u8,
23460}
23461impl ESC_INFO_DATA {
23462    pub const ENCODED_LEN: usize = 46usize;
23463    pub const DEFAULT: Self = Self {
23464        time_usec: 0_u64,
23465        error_count: [0_u32; 4usize],
23466        counter: 0_u16,
23467        failure_flags: [0_u16; 4usize],
23468        temperature: [0_i16; 4usize],
23469        index: 0_u8,
23470        count: 0_u8,
23471        connection_type: EscConnectionType::DEFAULT,
23472        info: 0_u8,
23473    };
23474    #[cfg(feature = "arbitrary")]
23475    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23476        use arbitrary::{Arbitrary, Unstructured};
23477        let mut buf = [0u8; 1024];
23478        rng.fill_bytes(&mut buf);
23479        let mut unstructured = Unstructured::new(&buf);
23480        Self::arbitrary(&mut unstructured).unwrap_or_default()
23481    }
23482}
23483impl Default for ESC_INFO_DATA {
23484    fn default() -> Self {
23485        Self::DEFAULT.clone()
23486    }
23487}
23488impl MessageData for ESC_INFO_DATA {
23489    type Message = MavMessage;
23490    const ID: u32 = 290u32;
23491    const NAME: &'static str = "ESC_INFO";
23492    const EXTRA_CRC: u8 = 251u8;
23493    const ENCODED_LEN: usize = 46usize;
23494    fn deser(
23495        _version: MavlinkVersion,
23496        __input: &[u8],
23497    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23498        let avail_len = __input.len();
23499        let mut payload_buf = [0; Self::ENCODED_LEN];
23500        let mut buf = if avail_len < Self::ENCODED_LEN {
23501            payload_buf[0..avail_len].copy_from_slice(__input);
23502            Bytes::new(&payload_buf)
23503        } else {
23504            Bytes::new(__input)
23505        };
23506        let mut __struct = Self::default();
23507        __struct.time_usec = buf.get_u64_le();
23508        for v in &mut __struct.error_count {
23509            let val = buf.get_u32_le();
23510            *v = val;
23511        }
23512        __struct.counter = buf.get_u16_le();
23513        for v in &mut __struct.failure_flags {
23514            let val = buf.get_u16_le();
23515            *v = val;
23516        }
23517        for v in &mut __struct.temperature {
23518            let val = buf.get_i16_le();
23519            *v = val;
23520        }
23521        __struct.index = buf.get_u8();
23522        __struct.count = buf.get_u8();
23523        let tmp = buf.get_u8();
23524        __struct.connection_type =
23525            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23526                enum_type: "EscConnectionType",
23527                value: tmp as u32,
23528            })?;
23529        __struct.info = buf.get_u8();
23530        Ok(__struct)
23531    }
23532    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23533        let mut __tmp = BytesMut::new(bytes);
23534        #[allow(clippy::absurd_extreme_comparisons)]
23535        #[allow(unused_comparisons)]
23536        if __tmp.remaining() < Self::ENCODED_LEN {
23537            panic!(
23538                "buffer is too small (need {} bytes, but got {})",
23539                Self::ENCODED_LEN,
23540                __tmp.remaining(),
23541            )
23542        }
23543        __tmp.put_u64_le(self.time_usec);
23544        for val in &self.error_count {
23545            __tmp.put_u32_le(*val);
23546        }
23547        __tmp.put_u16_le(self.counter);
23548        for val in &self.failure_flags {
23549            __tmp.put_u16_le(*val);
23550        }
23551        for val in &self.temperature {
23552            __tmp.put_i16_le(*val);
23553        }
23554        __tmp.put_u8(self.index);
23555        __tmp.put_u8(self.count);
23556        __tmp.put_u8(self.connection_type as u8);
23557        __tmp.put_u8(self.info);
23558        if matches!(version, MavlinkVersion::V2) {
23559            let len = __tmp.len();
23560            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23561        } else {
23562            __tmp.len()
23563        }
23564    }
23565}
23566#[doc = "id: 54"]
23567#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
23568#[derive(Debug, Clone, PartialEq)]
23569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23571pub struct SAFETY_SET_ALLOWED_AREA_DATA {
23572    #[doc = "x position 1 / Latitude 1"]
23573    pub p1x: f32,
23574    #[doc = "y position 1 / Longitude 1"]
23575    pub p1y: f32,
23576    #[doc = "z position 1 / Altitude 1"]
23577    pub p1z: f32,
23578    #[doc = "x position 2 / Latitude 2"]
23579    pub p2x: f32,
23580    #[doc = "y position 2 / Longitude 2"]
23581    pub p2y: f32,
23582    #[doc = "z position 2 / Altitude 2"]
23583    pub p2z: f32,
23584    #[doc = "System ID"]
23585    pub target_system: u8,
23586    #[doc = "Component ID"]
23587    pub target_component: u8,
23588    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
23589    pub frame: MavFrame,
23590}
23591impl SAFETY_SET_ALLOWED_AREA_DATA {
23592    pub const ENCODED_LEN: usize = 27usize;
23593    pub const DEFAULT: Self = Self {
23594        p1x: 0.0_f32,
23595        p1y: 0.0_f32,
23596        p1z: 0.0_f32,
23597        p2x: 0.0_f32,
23598        p2y: 0.0_f32,
23599        p2z: 0.0_f32,
23600        target_system: 0_u8,
23601        target_component: 0_u8,
23602        frame: MavFrame::DEFAULT,
23603    };
23604    #[cfg(feature = "arbitrary")]
23605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23606        use arbitrary::{Arbitrary, Unstructured};
23607        let mut buf = [0u8; 1024];
23608        rng.fill_bytes(&mut buf);
23609        let mut unstructured = Unstructured::new(&buf);
23610        Self::arbitrary(&mut unstructured).unwrap_or_default()
23611    }
23612}
23613impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
23614    fn default() -> Self {
23615        Self::DEFAULT.clone()
23616    }
23617}
23618impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
23619    type Message = MavMessage;
23620    const ID: u32 = 54u32;
23621    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
23622    const EXTRA_CRC: u8 = 15u8;
23623    const ENCODED_LEN: usize = 27usize;
23624    fn deser(
23625        _version: MavlinkVersion,
23626        __input: &[u8],
23627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23628        let avail_len = __input.len();
23629        let mut payload_buf = [0; Self::ENCODED_LEN];
23630        let mut buf = if avail_len < Self::ENCODED_LEN {
23631            payload_buf[0..avail_len].copy_from_slice(__input);
23632            Bytes::new(&payload_buf)
23633        } else {
23634            Bytes::new(__input)
23635        };
23636        let mut __struct = Self::default();
23637        __struct.p1x = buf.get_f32_le();
23638        __struct.p1y = buf.get_f32_le();
23639        __struct.p1z = buf.get_f32_le();
23640        __struct.p2x = buf.get_f32_le();
23641        __struct.p2y = buf.get_f32_le();
23642        __struct.p2z = buf.get_f32_le();
23643        __struct.target_system = buf.get_u8();
23644        __struct.target_component = buf.get_u8();
23645        let tmp = buf.get_u8();
23646        __struct.frame =
23647            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23648                enum_type: "MavFrame",
23649                value: tmp as u32,
23650            })?;
23651        Ok(__struct)
23652    }
23653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23654        let mut __tmp = BytesMut::new(bytes);
23655        #[allow(clippy::absurd_extreme_comparisons)]
23656        #[allow(unused_comparisons)]
23657        if __tmp.remaining() < Self::ENCODED_LEN {
23658            panic!(
23659                "buffer is too small (need {} bytes, but got {})",
23660                Self::ENCODED_LEN,
23661                __tmp.remaining(),
23662            )
23663        }
23664        __tmp.put_f32_le(self.p1x);
23665        __tmp.put_f32_le(self.p1y);
23666        __tmp.put_f32_le(self.p1z);
23667        __tmp.put_f32_le(self.p2x);
23668        __tmp.put_f32_le(self.p2y);
23669        __tmp.put_f32_le(self.p2z);
23670        __tmp.put_u8(self.target_system);
23671        __tmp.put_u8(self.target_component);
23672        __tmp.put_u8(self.frame as u8);
23673        if matches!(version, MavlinkVersion::V2) {
23674            let len = __tmp.len();
23675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23676        } else {
23677            __tmp.len()
23678        }
23679    }
23680}
23681#[doc = "id: 231"]
23682#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
23683#[derive(Debug, Clone, PartialEq)]
23684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23686pub struct WIND_COV_DATA {
23687    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23688    pub time_usec: u64,
23689    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
23690    pub wind_x: f32,
23691    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
23692    pub wind_y: f32,
23693    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
23694    pub wind_z: f32,
23695    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
23696    pub var_horiz: f32,
23697    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
23698    pub var_vert: f32,
23699    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
23700    pub wind_alt: f32,
23701    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
23702    pub horiz_accuracy: f32,
23703    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
23704    pub vert_accuracy: f32,
23705}
23706impl WIND_COV_DATA {
23707    pub const ENCODED_LEN: usize = 40usize;
23708    pub const DEFAULT: Self = Self {
23709        time_usec: 0_u64,
23710        wind_x: 0.0_f32,
23711        wind_y: 0.0_f32,
23712        wind_z: 0.0_f32,
23713        var_horiz: 0.0_f32,
23714        var_vert: 0.0_f32,
23715        wind_alt: 0.0_f32,
23716        horiz_accuracy: 0.0_f32,
23717        vert_accuracy: 0.0_f32,
23718    };
23719    #[cfg(feature = "arbitrary")]
23720    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23721        use arbitrary::{Arbitrary, Unstructured};
23722        let mut buf = [0u8; 1024];
23723        rng.fill_bytes(&mut buf);
23724        let mut unstructured = Unstructured::new(&buf);
23725        Self::arbitrary(&mut unstructured).unwrap_or_default()
23726    }
23727}
23728impl Default for WIND_COV_DATA {
23729    fn default() -> Self {
23730        Self::DEFAULT.clone()
23731    }
23732}
23733impl MessageData for WIND_COV_DATA {
23734    type Message = MavMessage;
23735    const ID: u32 = 231u32;
23736    const NAME: &'static str = "WIND_COV";
23737    const EXTRA_CRC: u8 = 105u8;
23738    const ENCODED_LEN: usize = 40usize;
23739    fn deser(
23740        _version: MavlinkVersion,
23741        __input: &[u8],
23742    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23743        let avail_len = __input.len();
23744        let mut payload_buf = [0; Self::ENCODED_LEN];
23745        let mut buf = if avail_len < Self::ENCODED_LEN {
23746            payload_buf[0..avail_len].copy_from_slice(__input);
23747            Bytes::new(&payload_buf)
23748        } else {
23749            Bytes::new(__input)
23750        };
23751        let mut __struct = Self::default();
23752        __struct.time_usec = buf.get_u64_le();
23753        __struct.wind_x = buf.get_f32_le();
23754        __struct.wind_y = buf.get_f32_le();
23755        __struct.wind_z = buf.get_f32_le();
23756        __struct.var_horiz = buf.get_f32_le();
23757        __struct.var_vert = buf.get_f32_le();
23758        __struct.wind_alt = buf.get_f32_le();
23759        __struct.horiz_accuracy = buf.get_f32_le();
23760        __struct.vert_accuracy = buf.get_f32_le();
23761        Ok(__struct)
23762    }
23763    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23764        let mut __tmp = BytesMut::new(bytes);
23765        #[allow(clippy::absurd_extreme_comparisons)]
23766        #[allow(unused_comparisons)]
23767        if __tmp.remaining() < Self::ENCODED_LEN {
23768            panic!(
23769                "buffer is too small (need {} bytes, but got {})",
23770                Self::ENCODED_LEN,
23771                __tmp.remaining(),
23772            )
23773        }
23774        __tmp.put_u64_le(self.time_usec);
23775        __tmp.put_f32_le(self.wind_x);
23776        __tmp.put_f32_le(self.wind_y);
23777        __tmp.put_f32_le(self.wind_z);
23778        __tmp.put_f32_le(self.var_horiz);
23779        __tmp.put_f32_le(self.var_vert);
23780        __tmp.put_f32_le(self.wind_alt);
23781        __tmp.put_f32_le(self.horiz_accuracy);
23782        __tmp.put_f32_le(self.vert_accuracy);
23783        if matches!(version, MavlinkVersion::V2) {
23784            let len = __tmp.len();
23785            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23786        } else {
23787            __tmp.len()
23788        }
23789    }
23790}
23791#[doc = "id: 83"]
23792#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
23793#[derive(Debug, Clone, PartialEq)]
23794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23796pub struct ATTITUDE_TARGET_DATA {
23797    #[doc = "Timestamp (time since system boot)."]
23798    pub time_boot_ms: u32,
23799    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
23800    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23801    pub q: [f32; 4],
23802    #[doc = "Body roll rate"]
23803    pub body_roll_rate: f32,
23804    #[doc = "Body pitch rate"]
23805    pub body_pitch_rate: f32,
23806    #[doc = "Body yaw rate"]
23807    pub body_yaw_rate: f32,
23808    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
23809    pub thrust: f32,
23810    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
23811    pub type_mask: AttitudeTargetTypemask,
23812}
23813impl ATTITUDE_TARGET_DATA {
23814    pub const ENCODED_LEN: usize = 37usize;
23815    pub const DEFAULT: Self = Self {
23816        time_boot_ms: 0_u32,
23817        q: [0.0_f32; 4usize],
23818        body_roll_rate: 0.0_f32,
23819        body_pitch_rate: 0.0_f32,
23820        body_yaw_rate: 0.0_f32,
23821        thrust: 0.0_f32,
23822        type_mask: AttitudeTargetTypemask::DEFAULT,
23823    };
23824    #[cfg(feature = "arbitrary")]
23825    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23826        use arbitrary::{Arbitrary, Unstructured};
23827        let mut buf = [0u8; 1024];
23828        rng.fill_bytes(&mut buf);
23829        let mut unstructured = Unstructured::new(&buf);
23830        Self::arbitrary(&mut unstructured).unwrap_or_default()
23831    }
23832}
23833impl Default for ATTITUDE_TARGET_DATA {
23834    fn default() -> Self {
23835        Self::DEFAULT.clone()
23836    }
23837}
23838impl MessageData for ATTITUDE_TARGET_DATA {
23839    type Message = MavMessage;
23840    const ID: u32 = 83u32;
23841    const NAME: &'static str = "ATTITUDE_TARGET";
23842    const EXTRA_CRC: u8 = 22u8;
23843    const ENCODED_LEN: usize = 37usize;
23844    fn deser(
23845        _version: MavlinkVersion,
23846        __input: &[u8],
23847    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23848        let avail_len = __input.len();
23849        let mut payload_buf = [0; Self::ENCODED_LEN];
23850        let mut buf = if avail_len < Self::ENCODED_LEN {
23851            payload_buf[0..avail_len].copy_from_slice(__input);
23852            Bytes::new(&payload_buf)
23853        } else {
23854            Bytes::new(__input)
23855        };
23856        let mut __struct = Self::default();
23857        __struct.time_boot_ms = buf.get_u32_le();
23858        for v in &mut __struct.q {
23859            let val = buf.get_f32_le();
23860            *v = val;
23861        }
23862        __struct.body_roll_rate = buf.get_f32_le();
23863        __struct.body_pitch_rate = buf.get_f32_le();
23864        __struct.body_yaw_rate = buf.get_f32_le();
23865        __struct.thrust = buf.get_f32_le();
23866        let tmp = buf.get_u8();
23867        __struct.type_mask = AttitudeTargetTypemask::from_bits(
23868            tmp & AttitudeTargetTypemask::all().bits(),
23869        )
23870        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23871            flag_type: "AttitudeTargetTypemask",
23872            value: tmp as u32,
23873        })?;
23874        Ok(__struct)
23875    }
23876    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23877        let mut __tmp = BytesMut::new(bytes);
23878        #[allow(clippy::absurd_extreme_comparisons)]
23879        #[allow(unused_comparisons)]
23880        if __tmp.remaining() < Self::ENCODED_LEN {
23881            panic!(
23882                "buffer is too small (need {} bytes, but got {})",
23883                Self::ENCODED_LEN,
23884                __tmp.remaining(),
23885            )
23886        }
23887        __tmp.put_u32_le(self.time_boot_ms);
23888        for val in &self.q {
23889            __tmp.put_f32_le(*val);
23890        }
23891        __tmp.put_f32_le(self.body_roll_rate);
23892        __tmp.put_f32_le(self.body_pitch_rate);
23893        __tmp.put_f32_le(self.body_yaw_rate);
23894        __tmp.put_f32_le(self.thrust);
23895        __tmp.put_u8(self.type_mask.bits());
23896        if matches!(version, MavlinkVersion::V2) {
23897            let len = __tmp.len();
23898            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23899        } else {
23900            __tmp.len()
23901        }
23902    }
23903}
23904#[doc = "id: 111"]
23905#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
23906#[derive(Debug, Clone, PartialEq)]
23907#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23908#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23909pub struct TIMESYNC_DATA {
23910    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
23911    pub tc1: i64,
23912    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
23913    pub ts1: i64,
23914    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
23915    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23916    pub target_system: u8,
23917    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
23918    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23919    pub target_component: u8,
23920}
23921impl TIMESYNC_DATA {
23922    pub const ENCODED_LEN: usize = 18usize;
23923    pub const DEFAULT: Self = Self {
23924        tc1: 0_i64,
23925        ts1: 0_i64,
23926        target_system: 0_u8,
23927        target_component: 0_u8,
23928    };
23929    #[cfg(feature = "arbitrary")]
23930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23931        use arbitrary::{Arbitrary, Unstructured};
23932        let mut buf = [0u8; 1024];
23933        rng.fill_bytes(&mut buf);
23934        let mut unstructured = Unstructured::new(&buf);
23935        Self::arbitrary(&mut unstructured).unwrap_or_default()
23936    }
23937}
23938impl Default for TIMESYNC_DATA {
23939    fn default() -> Self {
23940        Self::DEFAULT.clone()
23941    }
23942}
23943impl MessageData for TIMESYNC_DATA {
23944    type Message = MavMessage;
23945    const ID: u32 = 111u32;
23946    const NAME: &'static str = "TIMESYNC";
23947    const EXTRA_CRC: u8 = 34u8;
23948    const ENCODED_LEN: usize = 18usize;
23949    fn deser(
23950        _version: MavlinkVersion,
23951        __input: &[u8],
23952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23953        let avail_len = __input.len();
23954        let mut payload_buf = [0; Self::ENCODED_LEN];
23955        let mut buf = if avail_len < Self::ENCODED_LEN {
23956            payload_buf[0..avail_len].copy_from_slice(__input);
23957            Bytes::new(&payload_buf)
23958        } else {
23959            Bytes::new(__input)
23960        };
23961        let mut __struct = Self::default();
23962        __struct.tc1 = buf.get_i64_le();
23963        __struct.ts1 = buf.get_i64_le();
23964        __struct.target_system = buf.get_u8();
23965        __struct.target_component = buf.get_u8();
23966        Ok(__struct)
23967    }
23968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23969        let mut __tmp = BytesMut::new(bytes);
23970        #[allow(clippy::absurd_extreme_comparisons)]
23971        #[allow(unused_comparisons)]
23972        if __tmp.remaining() < Self::ENCODED_LEN {
23973            panic!(
23974                "buffer is too small (need {} bytes, but got {})",
23975                Self::ENCODED_LEN,
23976                __tmp.remaining(),
23977            )
23978        }
23979        __tmp.put_i64_le(self.tc1);
23980        __tmp.put_i64_le(self.ts1);
23981        __tmp.put_u8(self.target_system);
23982        __tmp.put_u8(self.target_component);
23983        if matches!(version, MavlinkVersion::V2) {
23984            let len = __tmp.len();
23985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23986        } else {
23987            __tmp.len()
23988        }
23989    }
23990}
23991#[doc = "id: 126"]
23992#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
23993#[derive(Debug, Clone, PartialEq)]
23994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23996pub struct SERIAL_CONTROL_DATA {
23997    #[doc = "Baudrate of transfer. Zero means no change."]
23998    pub baudrate: u32,
23999    #[doc = "Timeout for reply data"]
24000    pub timeout: u16,
24001    #[doc = "Serial control device type."]
24002    pub device: SerialControlDev,
24003    #[doc = "Bitmap of serial control flags."]
24004    pub flags: SerialControlFlag,
24005    #[doc = "how many bytes in this transfer"]
24006    pub count: u8,
24007    #[doc = "serial data"]
24008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24009    pub data: [u8; 70],
24010    #[doc = "System ID"]
24011    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24012    pub target_system: u8,
24013    #[doc = "Component ID"]
24014    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24015    pub target_component: u8,
24016}
24017impl SERIAL_CONTROL_DATA {
24018    pub const ENCODED_LEN: usize = 81usize;
24019    pub const DEFAULT: Self = Self {
24020        baudrate: 0_u32,
24021        timeout: 0_u16,
24022        device: SerialControlDev::DEFAULT,
24023        flags: SerialControlFlag::DEFAULT,
24024        count: 0_u8,
24025        data: [0_u8; 70usize],
24026        target_system: 0_u8,
24027        target_component: 0_u8,
24028    };
24029    #[cfg(feature = "arbitrary")]
24030    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24031        use arbitrary::{Arbitrary, Unstructured};
24032        let mut buf = [0u8; 1024];
24033        rng.fill_bytes(&mut buf);
24034        let mut unstructured = Unstructured::new(&buf);
24035        Self::arbitrary(&mut unstructured).unwrap_or_default()
24036    }
24037}
24038impl Default for SERIAL_CONTROL_DATA {
24039    fn default() -> Self {
24040        Self::DEFAULT.clone()
24041    }
24042}
24043impl MessageData for SERIAL_CONTROL_DATA {
24044    type Message = MavMessage;
24045    const ID: u32 = 126u32;
24046    const NAME: &'static str = "SERIAL_CONTROL";
24047    const EXTRA_CRC: u8 = 220u8;
24048    const ENCODED_LEN: usize = 81usize;
24049    fn deser(
24050        _version: MavlinkVersion,
24051        __input: &[u8],
24052    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24053        let avail_len = __input.len();
24054        let mut payload_buf = [0; Self::ENCODED_LEN];
24055        let mut buf = if avail_len < Self::ENCODED_LEN {
24056            payload_buf[0..avail_len].copy_from_slice(__input);
24057            Bytes::new(&payload_buf)
24058        } else {
24059            Bytes::new(__input)
24060        };
24061        let mut __struct = Self::default();
24062        __struct.baudrate = buf.get_u32_le();
24063        __struct.timeout = buf.get_u16_le();
24064        let tmp = buf.get_u8();
24065        __struct.device =
24066            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24067                enum_type: "SerialControlDev",
24068                value: tmp as u32,
24069            })?;
24070        let tmp = buf.get_u8();
24071        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
24072            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24073                flag_type: "SerialControlFlag",
24074                value: tmp as u32,
24075            })?;
24076        __struct.count = buf.get_u8();
24077        for v in &mut __struct.data {
24078            let val = buf.get_u8();
24079            *v = val;
24080        }
24081        __struct.target_system = buf.get_u8();
24082        __struct.target_component = buf.get_u8();
24083        Ok(__struct)
24084    }
24085    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24086        let mut __tmp = BytesMut::new(bytes);
24087        #[allow(clippy::absurd_extreme_comparisons)]
24088        #[allow(unused_comparisons)]
24089        if __tmp.remaining() < Self::ENCODED_LEN {
24090            panic!(
24091                "buffer is too small (need {} bytes, but got {})",
24092                Self::ENCODED_LEN,
24093                __tmp.remaining(),
24094            )
24095        }
24096        __tmp.put_u32_le(self.baudrate);
24097        __tmp.put_u16_le(self.timeout);
24098        __tmp.put_u8(self.device as u8);
24099        __tmp.put_u8(self.flags.bits());
24100        __tmp.put_u8(self.count);
24101        for val in &self.data {
24102            __tmp.put_u8(*val);
24103        }
24104        __tmp.put_u8(self.target_system);
24105        __tmp.put_u8(self.target_component);
24106        if matches!(version, MavlinkVersion::V2) {
24107            let len = __tmp.len();
24108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24109        } else {
24110            __tmp.len()
24111        }
24112    }
24113}
24114#[doc = "id: 120"]
24115#[doc = "Reply to LOG_REQUEST_DATA."]
24116#[derive(Debug, Clone, PartialEq)]
24117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24119pub struct LOG_DATA_DATA {
24120    #[doc = "Offset into the log"]
24121    pub ofs: u32,
24122    #[doc = "Log id (from LOG_ENTRY reply)"]
24123    pub id: u16,
24124    #[doc = "Number of bytes (zero for end of log)"]
24125    pub count: u8,
24126    #[doc = "log data"]
24127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24128    pub data: [u8; 90],
24129}
24130impl LOG_DATA_DATA {
24131    pub const ENCODED_LEN: usize = 97usize;
24132    pub const DEFAULT: Self = Self {
24133        ofs: 0_u32,
24134        id: 0_u16,
24135        count: 0_u8,
24136        data: [0_u8; 90usize],
24137    };
24138    #[cfg(feature = "arbitrary")]
24139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24140        use arbitrary::{Arbitrary, Unstructured};
24141        let mut buf = [0u8; 1024];
24142        rng.fill_bytes(&mut buf);
24143        let mut unstructured = Unstructured::new(&buf);
24144        Self::arbitrary(&mut unstructured).unwrap_or_default()
24145    }
24146}
24147impl Default for LOG_DATA_DATA {
24148    fn default() -> Self {
24149        Self::DEFAULT.clone()
24150    }
24151}
24152impl MessageData for LOG_DATA_DATA {
24153    type Message = MavMessage;
24154    const ID: u32 = 120u32;
24155    const NAME: &'static str = "LOG_DATA";
24156    const EXTRA_CRC: u8 = 134u8;
24157    const ENCODED_LEN: usize = 97usize;
24158    fn deser(
24159        _version: MavlinkVersion,
24160        __input: &[u8],
24161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24162        let avail_len = __input.len();
24163        let mut payload_buf = [0; Self::ENCODED_LEN];
24164        let mut buf = if avail_len < Self::ENCODED_LEN {
24165            payload_buf[0..avail_len].copy_from_slice(__input);
24166            Bytes::new(&payload_buf)
24167        } else {
24168            Bytes::new(__input)
24169        };
24170        let mut __struct = Self::default();
24171        __struct.ofs = buf.get_u32_le();
24172        __struct.id = buf.get_u16_le();
24173        __struct.count = buf.get_u8();
24174        for v in &mut __struct.data {
24175            let val = buf.get_u8();
24176            *v = val;
24177        }
24178        Ok(__struct)
24179    }
24180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24181        let mut __tmp = BytesMut::new(bytes);
24182        #[allow(clippy::absurd_extreme_comparisons)]
24183        #[allow(unused_comparisons)]
24184        if __tmp.remaining() < Self::ENCODED_LEN {
24185            panic!(
24186                "buffer is too small (need {} bytes, but got {})",
24187                Self::ENCODED_LEN,
24188                __tmp.remaining(),
24189            )
24190        }
24191        __tmp.put_u32_le(self.ofs);
24192        __tmp.put_u16_le(self.id);
24193        __tmp.put_u8(self.count);
24194        for val in &self.data {
24195            __tmp.put_u8(*val);
24196        }
24197        if matches!(version, MavlinkVersion::V2) {
24198            let len = __tmp.len();
24199            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24200        } else {
24201            __tmp.len()
24202        }
24203    }
24204}
24205#[doc = "id: 55"]
24206#[doc = "Read out the safety zone the MAV currently assumes."]
24207#[derive(Debug, Clone, PartialEq)]
24208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24209#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24210pub struct SAFETY_ALLOWED_AREA_DATA {
24211    #[doc = "x position 1 / Latitude 1"]
24212    pub p1x: f32,
24213    #[doc = "y position 1 / Longitude 1"]
24214    pub p1y: f32,
24215    #[doc = "z position 1 / Altitude 1"]
24216    pub p1z: f32,
24217    #[doc = "x position 2 / Latitude 2"]
24218    pub p2x: f32,
24219    #[doc = "y position 2 / Longitude 2"]
24220    pub p2y: f32,
24221    #[doc = "z position 2 / Altitude 2"]
24222    pub p2z: f32,
24223    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
24224    pub frame: MavFrame,
24225}
24226impl SAFETY_ALLOWED_AREA_DATA {
24227    pub const ENCODED_LEN: usize = 25usize;
24228    pub const DEFAULT: Self = Self {
24229        p1x: 0.0_f32,
24230        p1y: 0.0_f32,
24231        p1z: 0.0_f32,
24232        p2x: 0.0_f32,
24233        p2y: 0.0_f32,
24234        p2z: 0.0_f32,
24235        frame: MavFrame::DEFAULT,
24236    };
24237    #[cfg(feature = "arbitrary")]
24238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24239        use arbitrary::{Arbitrary, Unstructured};
24240        let mut buf = [0u8; 1024];
24241        rng.fill_bytes(&mut buf);
24242        let mut unstructured = Unstructured::new(&buf);
24243        Self::arbitrary(&mut unstructured).unwrap_or_default()
24244    }
24245}
24246impl Default for SAFETY_ALLOWED_AREA_DATA {
24247    fn default() -> Self {
24248        Self::DEFAULT.clone()
24249    }
24250}
24251impl MessageData for SAFETY_ALLOWED_AREA_DATA {
24252    type Message = MavMessage;
24253    const ID: u32 = 55u32;
24254    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
24255    const EXTRA_CRC: u8 = 3u8;
24256    const ENCODED_LEN: usize = 25usize;
24257    fn deser(
24258        _version: MavlinkVersion,
24259        __input: &[u8],
24260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24261        let avail_len = __input.len();
24262        let mut payload_buf = [0; Self::ENCODED_LEN];
24263        let mut buf = if avail_len < Self::ENCODED_LEN {
24264            payload_buf[0..avail_len].copy_from_slice(__input);
24265            Bytes::new(&payload_buf)
24266        } else {
24267            Bytes::new(__input)
24268        };
24269        let mut __struct = Self::default();
24270        __struct.p1x = buf.get_f32_le();
24271        __struct.p1y = buf.get_f32_le();
24272        __struct.p1z = buf.get_f32_le();
24273        __struct.p2x = buf.get_f32_le();
24274        __struct.p2y = buf.get_f32_le();
24275        __struct.p2z = buf.get_f32_le();
24276        let tmp = buf.get_u8();
24277        __struct.frame =
24278            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24279                enum_type: "MavFrame",
24280                value: tmp as u32,
24281            })?;
24282        Ok(__struct)
24283    }
24284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24285        let mut __tmp = BytesMut::new(bytes);
24286        #[allow(clippy::absurd_extreme_comparisons)]
24287        #[allow(unused_comparisons)]
24288        if __tmp.remaining() < Self::ENCODED_LEN {
24289            panic!(
24290                "buffer is too small (need {} bytes, but got {})",
24291                Self::ENCODED_LEN,
24292                __tmp.remaining(),
24293            )
24294        }
24295        __tmp.put_f32_le(self.p1x);
24296        __tmp.put_f32_le(self.p1y);
24297        __tmp.put_f32_le(self.p1z);
24298        __tmp.put_f32_le(self.p2x);
24299        __tmp.put_f32_le(self.p2y);
24300        __tmp.put_f32_le(self.p2z);
24301        __tmp.put_u8(self.frame as u8);
24302        if matches!(version, MavlinkVersion::V2) {
24303            let len = __tmp.len();
24304            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24305        } else {
24306            __tmp.len()
24307        }
24308    }
24309}
24310#[doc = "id: 24"]
24311#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
24312#[derive(Debug, Clone, PartialEq)]
24313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24315pub struct GPS_RAW_INT_DATA {
24316    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24317    pub time_usec: u64,
24318    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
24319    pub lat: i32,
24320    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
24321    pub lon: i32,
24322    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
24323    pub alt: i32,
24324    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
24325    pub eph: u16,
24326    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
24327    pub epv: u16,
24328    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
24329    pub vel: u16,
24330    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
24331    pub cog: u16,
24332    #[doc = "GPS fix type."]
24333    pub fix_type: GpsFixType,
24334    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
24335    pub satellites_visible: u8,
24336    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
24337    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24338    pub alt_ellipsoid: i32,
24339    #[doc = "Position uncertainty."]
24340    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24341    pub h_acc: u32,
24342    #[doc = "Altitude uncertainty."]
24343    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24344    pub v_acc: u32,
24345    #[doc = "Speed uncertainty."]
24346    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24347    pub vel_acc: u32,
24348    #[doc = "Heading / track uncertainty"]
24349    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24350    pub hdg_acc: u32,
24351    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
24352    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24353    pub yaw: u16,
24354}
24355impl GPS_RAW_INT_DATA {
24356    pub const ENCODED_LEN: usize = 52usize;
24357    pub const DEFAULT: Self = Self {
24358        time_usec: 0_u64,
24359        lat: 0_i32,
24360        lon: 0_i32,
24361        alt: 0_i32,
24362        eph: 0_u16,
24363        epv: 0_u16,
24364        vel: 0_u16,
24365        cog: 0_u16,
24366        fix_type: GpsFixType::DEFAULT,
24367        satellites_visible: 0_u8,
24368        alt_ellipsoid: 0_i32,
24369        h_acc: 0_u32,
24370        v_acc: 0_u32,
24371        vel_acc: 0_u32,
24372        hdg_acc: 0_u32,
24373        yaw: 0_u16,
24374    };
24375    #[cfg(feature = "arbitrary")]
24376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24377        use arbitrary::{Arbitrary, Unstructured};
24378        let mut buf = [0u8; 1024];
24379        rng.fill_bytes(&mut buf);
24380        let mut unstructured = Unstructured::new(&buf);
24381        Self::arbitrary(&mut unstructured).unwrap_or_default()
24382    }
24383}
24384impl Default for GPS_RAW_INT_DATA {
24385    fn default() -> Self {
24386        Self::DEFAULT.clone()
24387    }
24388}
24389impl MessageData for GPS_RAW_INT_DATA {
24390    type Message = MavMessage;
24391    const ID: u32 = 24u32;
24392    const NAME: &'static str = "GPS_RAW_INT";
24393    const EXTRA_CRC: u8 = 24u8;
24394    const ENCODED_LEN: usize = 52usize;
24395    fn deser(
24396        _version: MavlinkVersion,
24397        __input: &[u8],
24398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24399        let avail_len = __input.len();
24400        let mut payload_buf = [0; Self::ENCODED_LEN];
24401        let mut buf = if avail_len < Self::ENCODED_LEN {
24402            payload_buf[0..avail_len].copy_from_slice(__input);
24403            Bytes::new(&payload_buf)
24404        } else {
24405            Bytes::new(__input)
24406        };
24407        let mut __struct = Self::default();
24408        __struct.time_usec = buf.get_u64_le();
24409        __struct.lat = buf.get_i32_le();
24410        __struct.lon = buf.get_i32_le();
24411        __struct.alt = buf.get_i32_le();
24412        __struct.eph = buf.get_u16_le();
24413        __struct.epv = buf.get_u16_le();
24414        __struct.vel = buf.get_u16_le();
24415        __struct.cog = buf.get_u16_le();
24416        let tmp = buf.get_u8();
24417        __struct.fix_type =
24418            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24419                enum_type: "GpsFixType",
24420                value: tmp as u32,
24421            })?;
24422        __struct.satellites_visible = buf.get_u8();
24423        __struct.alt_ellipsoid = buf.get_i32_le();
24424        __struct.h_acc = buf.get_u32_le();
24425        __struct.v_acc = buf.get_u32_le();
24426        __struct.vel_acc = buf.get_u32_le();
24427        __struct.hdg_acc = buf.get_u32_le();
24428        __struct.yaw = buf.get_u16_le();
24429        Ok(__struct)
24430    }
24431    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24432        let mut __tmp = BytesMut::new(bytes);
24433        #[allow(clippy::absurd_extreme_comparisons)]
24434        #[allow(unused_comparisons)]
24435        if __tmp.remaining() < Self::ENCODED_LEN {
24436            panic!(
24437                "buffer is too small (need {} bytes, but got {})",
24438                Self::ENCODED_LEN,
24439                __tmp.remaining(),
24440            )
24441        }
24442        __tmp.put_u64_le(self.time_usec);
24443        __tmp.put_i32_le(self.lat);
24444        __tmp.put_i32_le(self.lon);
24445        __tmp.put_i32_le(self.alt);
24446        __tmp.put_u16_le(self.eph);
24447        __tmp.put_u16_le(self.epv);
24448        __tmp.put_u16_le(self.vel);
24449        __tmp.put_u16_le(self.cog);
24450        __tmp.put_u8(self.fix_type as u8);
24451        __tmp.put_u8(self.satellites_visible);
24452        __tmp.put_i32_le(self.alt_ellipsoid);
24453        __tmp.put_u32_le(self.h_acc);
24454        __tmp.put_u32_le(self.v_acc);
24455        __tmp.put_u32_le(self.vel_acc);
24456        __tmp.put_u32_le(self.hdg_acc);
24457        __tmp.put_u16_le(self.yaw);
24458        if matches!(version, MavlinkVersion::V2) {
24459            let len = __tmp.len();
24460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24461        } else {
24462            __tmp.len()
24463        }
24464    }
24465}
24466#[doc = "id: 7"]
24467#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
24468#[derive(Debug, Clone, PartialEq)]
24469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24471pub struct AUTH_KEY_DATA {
24472    #[doc = "key"]
24473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24474    pub key: [u8; 32],
24475}
24476impl AUTH_KEY_DATA {
24477    pub const ENCODED_LEN: usize = 32usize;
24478    pub const DEFAULT: Self = Self {
24479        key: [0_u8; 32usize],
24480    };
24481    #[cfg(feature = "arbitrary")]
24482    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24483        use arbitrary::{Arbitrary, Unstructured};
24484        let mut buf = [0u8; 1024];
24485        rng.fill_bytes(&mut buf);
24486        let mut unstructured = Unstructured::new(&buf);
24487        Self::arbitrary(&mut unstructured).unwrap_or_default()
24488    }
24489}
24490impl Default for AUTH_KEY_DATA {
24491    fn default() -> Self {
24492        Self::DEFAULT.clone()
24493    }
24494}
24495impl MessageData for AUTH_KEY_DATA {
24496    type Message = MavMessage;
24497    const ID: u32 = 7u32;
24498    const NAME: &'static str = "AUTH_KEY";
24499    const EXTRA_CRC: u8 = 119u8;
24500    const ENCODED_LEN: usize = 32usize;
24501    fn deser(
24502        _version: MavlinkVersion,
24503        __input: &[u8],
24504    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24505        let avail_len = __input.len();
24506        let mut payload_buf = [0; Self::ENCODED_LEN];
24507        let mut buf = if avail_len < Self::ENCODED_LEN {
24508            payload_buf[0..avail_len].copy_from_slice(__input);
24509            Bytes::new(&payload_buf)
24510        } else {
24511            Bytes::new(__input)
24512        };
24513        let mut __struct = Self::default();
24514        for v in &mut __struct.key {
24515            let val = buf.get_u8();
24516            *v = val;
24517        }
24518        Ok(__struct)
24519    }
24520    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24521        let mut __tmp = BytesMut::new(bytes);
24522        #[allow(clippy::absurd_extreme_comparisons)]
24523        #[allow(unused_comparisons)]
24524        if __tmp.remaining() < Self::ENCODED_LEN {
24525            panic!(
24526                "buffer is too small (need {} bytes, but got {})",
24527                Self::ENCODED_LEN,
24528                __tmp.remaining(),
24529            )
24530        }
24531        for val in &self.key {
24532            __tmp.put_u8(*val);
24533        }
24534        if matches!(version, MavlinkVersion::V2) {
24535            let len = __tmp.len();
24536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24537        } else {
24538            __tmp.len()
24539        }
24540    }
24541}
24542#[doc = "id: 64"]
24543#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
24544#[derive(Debug, Clone, PartialEq)]
24545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24547pub struct LOCAL_POSITION_NED_COV_DATA {
24548    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24549    pub time_usec: u64,
24550    #[doc = "X Position"]
24551    pub x: f32,
24552    #[doc = "Y Position"]
24553    pub y: f32,
24554    #[doc = "Z Position"]
24555    pub z: f32,
24556    #[doc = "X Speed"]
24557    pub vx: f32,
24558    #[doc = "Y Speed"]
24559    pub vy: f32,
24560    #[doc = "Z Speed"]
24561    pub vz: f32,
24562    #[doc = "X Acceleration"]
24563    pub ax: f32,
24564    #[doc = "Y Acceleration"]
24565    pub ay: f32,
24566    #[doc = "Z Acceleration"]
24567    pub az: f32,
24568    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
24569    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24570    pub covariance: [f32; 45],
24571    #[doc = "Class id of the estimator this estimate originated from."]
24572    pub estimator_type: MavEstimatorType,
24573}
24574impl LOCAL_POSITION_NED_COV_DATA {
24575    pub const ENCODED_LEN: usize = 225usize;
24576    pub const DEFAULT: Self = Self {
24577        time_usec: 0_u64,
24578        x: 0.0_f32,
24579        y: 0.0_f32,
24580        z: 0.0_f32,
24581        vx: 0.0_f32,
24582        vy: 0.0_f32,
24583        vz: 0.0_f32,
24584        ax: 0.0_f32,
24585        ay: 0.0_f32,
24586        az: 0.0_f32,
24587        covariance: [0.0_f32; 45usize],
24588        estimator_type: MavEstimatorType::DEFAULT,
24589    };
24590    #[cfg(feature = "arbitrary")]
24591    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24592        use arbitrary::{Arbitrary, Unstructured};
24593        let mut buf = [0u8; 1024];
24594        rng.fill_bytes(&mut buf);
24595        let mut unstructured = Unstructured::new(&buf);
24596        Self::arbitrary(&mut unstructured).unwrap_or_default()
24597    }
24598}
24599impl Default for LOCAL_POSITION_NED_COV_DATA {
24600    fn default() -> Self {
24601        Self::DEFAULT.clone()
24602    }
24603}
24604impl MessageData for LOCAL_POSITION_NED_COV_DATA {
24605    type Message = MavMessage;
24606    const ID: u32 = 64u32;
24607    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
24608    const EXTRA_CRC: u8 = 191u8;
24609    const ENCODED_LEN: usize = 225usize;
24610    fn deser(
24611        _version: MavlinkVersion,
24612        __input: &[u8],
24613    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24614        let avail_len = __input.len();
24615        let mut payload_buf = [0; Self::ENCODED_LEN];
24616        let mut buf = if avail_len < Self::ENCODED_LEN {
24617            payload_buf[0..avail_len].copy_from_slice(__input);
24618            Bytes::new(&payload_buf)
24619        } else {
24620            Bytes::new(__input)
24621        };
24622        let mut __struct = Self::default();
24623        __struct.time_usec = buf.get_u64_le();
24624        __struct.x = buf.get_f32_le();
24625        __struct.y = buf.get_f32_le();
24626        __struct.z = buf.get_f32_le();
24627        __struct.vx = buf.get_f32_le();
24628        __struct.vy = buf.get_f32_le();
24629        __struct.vz = buf.get_f32_le();
24630        __struct.ax = buf.get_f32_le();
24631        __struct.ay = buf.get_f32_le();
24632        __struct.az = buf.get_f32_le();
24633        for v in &mut __struct.covariance {
24634            let val = buf.get_f32_le();
24635            *v = val;
24636        }
24637        let tmp = buf.get_u8();
24638        __struct.estimator_type =
24639            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24640                enum_type: "MavEstimatorType",
24641                value: tmp as u32,
24642            })?;
24643        Ok(__struct)
24644    }
24645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24646        let mut __tmp = BytesMut::new(bytes);
24647        #[allow(clippy::absurd_extreme_comparisons)]
24648        #[allow(unused_comparisons)]
24649        if __tmp.remaining() < Self::ENCODED_LEN {
24650            panic!(
24651                "buffer is too small (need {} bytes, but got {})",
24652                Self::ENCODED_LEN,
24653                __tmp.remaining(),
24654            )
24655        }
24656        __tmp.put_u64_le(self.time_usec);
24657        __tmp.put_f32_le(self.x);
24658        __tmp.put_f32_le(self.y);
24659        __tmp.put_f32_le(self.z);
24660        __tmp.put_f32_le(self.vx);
24661        __tmp.put_f32_le(self.vy);
24662        __tmp.put_f32_le(self.vz);
24663        __tmp.put_f32_le(self.ax);
24664        __tmp.put_f32_le(self.ay);
24665        __tmp.put_f32_le(self.az);
24666        for val in &self.covariance {
24667            __tmp.put_f32_le(*val);
24668        }
24669        __tmp.put_u8(self.estimator_type as u8);
24670        if matches!(version, MavlinkVersion::V2) {
24671            let len = __tmp.len();
24672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24673        } else {
24674            __tmp.len()
24675        }
24676    }
24677}
24678#[doc = "id: 119"]
24679#[doc = "Request a chunk of a log."]
24680#[derive(Debug, Clone, PartialEq)]
24681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24683pub struct LOG_REQUEST_DATA_DATA {
24684    #[doc = "Offset into the log"]
24685    pub ofs: u32,
24686    #[doc = "Number of bytes"]
24687    pub count: u32,
24688    #[doc = "Log id (from LOG_ENTRY reply)"]
24689    pub id: u16,
24690    #[doc = "System ID"]
24691    pub target_system: u8,
24692    #[doc = "Component ID"]
24693    pub target_component: u8,
24694}
24695impl LOG_REQUEST_DATA_DATA {
24696    pub const ENCODED_LEN: usize = 12usize;
24697    pub const DEFAULT: Self = Self {
24698        ofs: 0_u32,
24699        count: 0_u32,
24700        id: 0_u16,
24701        target_system: 0_u8,
24702        target_component: 0_u8,
24703    };
24704    #[cfg(feature = "arbitrary")]
24705    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24706        use arbitrary::{Arbitrary, Unstructured};
24707        let mut buf = [0u8; 1024];
24708        rng.fill_bytes(&mut buf);
24709        let mut unstructured = Unstructured::new(&buf);
24710        Self::arbitrary(&mut unstructured).unwrap_or_default()
24711    }
24712}
24713impl Default for LOG_REQUEST_DATA_DATA {
24714    fn default() -> Self {
24715        Self::DEFAULT.clone()
24716    }
24717}
24718impl MessageData for LOG_REQUEST_DATA_DATA {
24719    type Message = MavMessage;
24720    const ID: u32 = 119u32;
24721    const NAME: &'static str = "LOG_REQUEST_DATA";
24722    const EXTRA_CRC: u8 = 116u8;
24723    const ENCODED_LEN: usize = 12usize;
24724    fn deser(
24725        _version: MavlinkVersion,
24726        __input: &[u8],
24727    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24728        let avail_len = __input.len();
24729        let mut payload_buf = [0; Self::ENCODED_LEN];
24730        let mut buf = if avail_len < Self::ENCODED_LEN {
24731            payload_buf[0..avail_len].copy_from_slice(__input);
24732            Bytes::new(&payload_buf)
24733        } else {
24734            Bytes::new(__input)
24735        };
24736        let mut __struct = Self::default();
24737        __struct.ofs = buf.get_u32_le();
24738        __struct.count = buf.get_u32_le();
24739        __struct.id = buf.get_u16_le();
24740        __struct.target_system = buf.get_u8();
24741        __struct.target_component = buf.get_u8();
24742        Ok(__struct)
24743    }
24744    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24745        let mut __tmp = BytesMut::new(bytes);
24746        #[allow(clippy::absurd_extreme_comparisons)]
24747        #[allow(unused_comparisons)]
24748        if __tmp.remaining() < Self::ENCODED_LEN {
24749            panic!(
24750                "buffer is too small (need {} bytes, but got {})",
24751                Self::ENCODED_LEN,
24752                __tmp.remaining(),
24753            )
24754        }
24755        __tmp.put_u32_le(self.ofs);
24756        __tmp.put_u32_le(self.count);
24757        __tmp.put_u16_le(self.id);
24758        __tmp.put_u8(self.target_system);
24759        __tmp.put_u8(self.target_component);
24760        if matches!(version, MavlinkVersion::V2) {
24761            let len = __tmp.len();
24762            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24763        } else {
24764            __tmp.len()
24765        }
24766    }
24767}
24768#[doc = "id: 395"]
24769#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
24770#[derive(Debug, Clone, PartialEq)]
24771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24772#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24773pub struct COMPONENT_INFORMATION_DATA {
24774    #[doc = "Timestamp (time since system boot)."]
24775    pub time_boot_ms: u32,
24776    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
24777    pub general_metadata_file_crc: u32,
24778    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
24779    pub peripherals_metadata_file_crc: u32,
24780    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
24781    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24782    pub general_metadata_uri: [u8; 100],
24783    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
24784    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24785    pub peripherals_metadata_uri: [u8; 100],
24786}
24787impl COMPONENT_INFORMATION_DATA {
24788    pub const ENCODED_LEN: usize = 212usize;
24789    pub const DEFAULT: Self = Self {
24790        time_boot_ms: 0_u32,
24791        general_metadata_file_crc: 0_u32,
24792        peripherals_metadata_file_crc: 0_u32,
24793        general_metadata_uri: [0_u8; 100usize],
24794        peripherals_metadata_uri: [0_u8; 100usize],
24795    };
24796    #[cfg(feature = "arbitrary")]
24797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24798        use arbitrary::{Arbitrary, Unstructured};
24799        let mut buf = [0u8; 1024];
24800        rng.fill_bytes(&mut buf);
24801        let mut unstructured = Unstructured::new(&buf);
24802        Self::arbitrary(&mut unstructured).unwrap_or_default()
24803    }
24804}
24805impl Default for COMPONENT_INFORMATION_DATA {
24806    fn default() -> Self {
24807        Self::DEFAULT.clone()
24808    }
24809}
24810impl MessageData for COMPONENT_INFORMATION_DATA {
24811    type Message = MavMessage;
24812    const ID: u32 = 395u32;
24813    const NAME: &'static str = "COMPONENT_INFORMATION";
24814    const EXTRA_CRC: u8 = 0u8;
24815    const ENCODED_LEN: usize = 212usize;
24816    fn deser(
24817        _version: MavlinkVersion,
24818        __input: &[u8],
24819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24820        let avail_len = __input.len();
24821        let mut payload_buf = [0; Self::ENCODED_LEN];
24822        let mut buf = if avail_len < Self::ENCODED_LEN {
24823            payload_buf[0..avail_len].copy_from_slice(__input);
24824            Bytes::new(&payload_buf)
24825        } else {
24826            Bytes::new(__input)
24827        };
24828        let mut __struct = Self::default();
24829        __struct.time_boot_ms = buf.get_u32_le();
24830        __struct.general_metadata_file_crc = buf.get_u32_le();
24831        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
24832        for v in &mut __struct.general_metadata_uri {
24833            let val = buf.get_u8();
24834            *v = val;
24835        }
24836        for v in &mut __struct.peripherals_metadata_uri {
24837            let val = buf.get_u8();
24838            *v = val;
24839        }
24840        Ok(__struct)
24841    }
24842    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24843        let mut __tmp = BytesMut::new(bytes);
24844        #[allow(clippy::absurd_extreme_comparisons)]
24845        #[allow(unused_comparisons)]
24846        if __tmp.remaining() < Self::ENCODED_LEN {
24847            panic!(
24848                "buffer is too small (need {} bytes, but got {})",
24849                Self::ENCODED_LEN,
24850                __tmp.remaining(),
24851            )
24852        }
24853        __tmp.put_u32_le(self.time_boot_ms);
24854        __tmp.put_u32_le(self.general_metadata_file_crc);
24855        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
24856        for val in &self.general_metadata_uri {
24857            __tmp.put_u8(*val);
24858        }
24859        for val in &self.peripherals_metadata_uri {
24860            __tmp.put_u8(*val);
24861        }
24862        if matches!(version, MavlinkVersion::V2) {
24863            let len = __tmp.len();
24864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24865        } else {
24866            __tmp.len()
24867        }
24868    }
24869}
24870#[doc = "id: 12905"]
24871#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
24872#[derive(Debug, Clone, PartialEq)]
24873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24875pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
24876    #[doc = "System ID (0 for broadcast)."]
24877    pub target_system: u8,
24878    #[doc = "Component ID (0 for broadcast)."]
24879    pub target_component: u8,
24880    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24881    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24882    pub id_or_mac: [u8; 20],
24883    #[doc = "Indicates the type of the operator_id field."]
24884    pub operator_id_type: MavOdidOperatorIdType,
24885    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
24886    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24887    pub operator_id: [u8; 20],
24888}
24889impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
24890    pub const ENCODED_LEN: usize = 43usize;
24891    pub const DEFAULT: Self = Self {
24892        target_system: 0_u8,
24893        target_component: 0_u8,
24894        id_or_mac: [0_u8; 20usize],
24895        operator_id_type: MavOdidOperatorIdType::DEFAULT,
24896        operator_id: [0_u8; 20usize],
24897    };
24898    #[cfg(feature = "arbitrary")]
24899    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24900        use arbitrary::{Arbitrary, Unstructured};
24901        let mut buf = [0u8; 1024];
24902        rng.fill_bytes(&mut buf);
24903        let mut unstructured = Unstructured::new(&buf);
24904        Self::arbitrary(&mut unstructured).unwrap_or_default()
24905    }
24906}
24907impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
24908    fn default() -> Self {
24909        Self::DEFAULT.clone()
24910    }
24911}
24912impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
24913    type Message = MavMessage;
24914    const ID: u32 = 12905u32;
24915    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
24916    const EXTRA_CRC: u8 = 49u8;
24917    const ENCODED_LEN: usize = 43usize;
24918    fn deser(
24919        _version: MavlinkVersion,
24920        __input: &[u8],
24921    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24922        let avail_len = __input.len();
24923        let mut payload_buf = [0; Self::ENCODED_LEN];
24924        let mut buf = if avail_len < Self::ENCODED_LEN {
24925            payload_buf[0..avail_len].copy_from_slice(__input);
24926            Bytes::new(&payload_buf)
24927        } else {
24928            Bytes::new(__input)
24929        };
24930        let mut __struct = Self::default();
24931        __struct.target_system = buf.get_u8();
24932        __struct.target_component = buf.get_u8();
24933        for v in &mut __struct.id_or_mac {
24934            let val = buf.get_u8();
24935            *v = val;
24936        }
24937        let tmp = buf.get_u8();
24938        __struct.operator_id_type =
24939            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24940                enum_type: "MavOdidOperatorIdType",
24941                value: tmp as u32,
24942            })?;
24943        for v in &mut __struct.operator_id {
24944            let val = buf.get_u8();
24945            *v = val;
24946        }
24947        Ok(__struct)
24948    }
24949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24950        let mut __tmp = BytesMut::new(bytes);
24951        #[allow(clippy::absurd_extreme_comparisons)]
24952        #[allow(unused_comparisons)]
24953        if __tmp.remaining() < Self::ENCODED_LEN {
24954            panic!(
24955                "buffer is too small (need {} bytes, but got {})",
24956                Self::ENCODED_LEN,
24957                __tmp.remaining(),
24958            )
24959        }
24960        __tmp.put_u8(self.target_system);
24961        __tmp.put_u8(self.target_component);
24962        for val in &self.id_or_mac {
24963            __tmp.put_u8(*val);
24964        }
24965        __tmp.put_u8(self.operator_id_type as u8);
24966        for val in &self.operator_id {
24967            __tmp.put_u8(*val);
24968        }
24969        if matches!(version, MavlinkVersion::V2) {
24970            let len = __tmp.len();
24971            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24972        } else {
24973            __tmp.len()
24974        }
24975    }
24976}
24977#[doc = "id: 230"]
24978#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
24979#[derive(Debug, Clone, PartialEq)]
24980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24982pub struct ESTIMATOR_STATUS_DATA {
24983    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24984    pub time_usec: u64,
24985    #[doc = "Velocity innovation test ratio"]
24986    pub vel_ratio: f32,
24987    #[doc = "Horizontal position innovation test ratio"]
24988    pub pos_horiz_ratio: f32,
24989    #[doc = "Vertical position innovation test ratio"]
24990    pub pos_vert_ratio: f32,
24991    #[doc = "Magnetometer innovation test ratio"]
24992    pub mag_ratio: f32,
24993    #[doc = "Height above terrain innovation test ratio"]
24994    pub hagl_ratio: f32,
24995    #[doc = "True airspeed innovation test ratio"]
24996    pub tas_ratio: f32,
24997    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
24998    pub pos_horiz_accuracy: f32,
24999    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
25000    pub pos_vert_accuracy: f32,
25001    #[doc = "Bitmap indicating which EKF outputs are valid."]
25002    pub flags: EstimatorStatusFlags,
25003}
25004impl ESTIMATOR_STATUS_DATA {
25005    pub const ENCODED_LEN: usize = 42usize;
25006    pub const DEFAULT: Self = Self {
25007        time_usec: 0_u64,
25008        vel_ratio: 0.0_f32,
25009        pos_horiz_ratio: 0.0_f32,
25010        pos_vert_ratio: 0.0_f32,
25011        mag_ratio: 0.0_f32,
25012        hagl_ratio: 0.0_f32,
25013        tas_ratio: 0.0_f32,
25014        pos_horiz_accuracy: 0.0_f32,
25015        pos_vert_accuracy: 0.0_f32,
25016        flags: EstimatorStatusFlags::DEFAULT,
25017    };
25018    #[cfg(feature = "arbitrary")]
25019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25020        use arbitrary::{Arbitrary, Unstructured};
25021        let mut buf = [0u8; 1024];
25022        rng.fill_bytes(&mut buf);
25023        let mut unstructured = Unstructured::new(&buf);
25024        Self::arbitrary(&mut unstructured).unwrap_or_default()
25025    }
25026}
25027impl Default for ESTIMATOR_STATUS_DATA {
25028    fn default() -> Self {
25029        Self::DEFAULT.clone()
25030    }
25031}
25032impl MessageData for ESTIMATOR_STATUS_DATA {
25033    type Message = MavMessage;
25034    const ID: u32 = 230u32;
25035    const NAME: &'static str = "ESTIMATOR_STATUS";
25036    const EXTRA_CRC: u8 = 163u8;
25037    const ENCODED_LEN: usize = 42usize;
25038    fn deser(
25039        _version: MavlinkVersion,
25040        __input: &[u8],
25041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25042        let avail_len = __input.len();
25043        let mut payload_buf = [0; Self::ENCODED_LEN];
25044        let mut buf = if avail_len < Self::ENCODED_LEN {
25045            payload_buf[0..avail_len].copy_from_slice(__input);
25046            Bytes::new(&payload_buf)
25047        } else {
25048            Bytes::new(__input)
25049        };
25050        let mut __struct = Self::default();
25051        __struct.time_usec = buf.get_u64_le();
25052        __struct.vel_ratio = buf.get_f32_le();
25053        __struct.pos_horiz_ratio = buf.get_f32_le();
25054        __struct.pos_vert_ratio = buf.get_f32_le();
25055        __struct.mag_ratio = buf.get_f32_le();
25056        __struct.hagl_ratio = buf.get_f32_le();
25057        __struct.tas_ratio = buf.get_f32_le();
25058        __struct.pos_horiz_accuracy = buf.get_f32_le();
25059        __struct.pos_vert_accuracy = buf.get_f32_le();
25060        let tmp = buf.get_u16_le();
25061        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
25062            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25063                flag_type: "EstimatorStatusFlags",
25064                value: tmp as u32,
25065            })?;
25066        Ok(__struct)
25067    }
25068    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25069        let mut __tmp = BytesMut::new(bytes);
25070        #[allow(clippy::absurd_extreme_comparisons)]
25071        #[allow(unused_comparisons)]
25072        if __tmp.remaining() < Self::ENCODED_LEN {
25073            panic!(
25074                "buffer is too small (need {} bytes, but got {})",
25075                Self::ENCODED_LEN,
25076                __tmp.remaining(),
25077            )
25078        }
25079        __tmp.put_u64_le(self.time_usec);
25080        __tmp.put_f32_le(self.vel_ratio);
25081        __tmp.put_f32_le(self.pos_horiz_ratio);
25082        __tmp.put_f32_le(self.pos_vert_ratio);
25083        __tmp.put_f32_le(self.mag_ratio);
25084        __tmp.put_f32_le(self.hagl_ratio);
25085        __tmp.put_f32_le(self.tas_ratio);
25086        __tmp.put_f32_le(self.pos_horiz_accuracy);
25087        __tmp.put_f32_le(self.pos_vert_accuracy);
25088        __tmp.put_u16_le(self.flags.bits());
25089        if matches!(version, MavlinkVersion::V2) {
25090            let len = __tmp.len();
25091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25092        } else {
25093            __tmp.len()
25094        }
25095    }
25096}
25097#[doc = "id: 70"]
25098#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25099#[derive(Debug, Clone, PartialEq)]
25100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25102pub struct RC_CHANNELS_OVERRIDE_DATA {
25103    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25104    pub chan1_raw: u16,
25105    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25106    pub chan2_raw: u16,
25107    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25108    pub chan3_raw: u16,
25109    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25110    pub chan4_raw: u16,
25111    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25112    pub chan5_raw: u16,
25113    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25114    pub chan6_raw: u16,
25115    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25116    pub chan7_raw: u16,
25117    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25118    pub chan8_raw: u16,
25119    #[doc = "System ID"]
25120    pub target_system: u8,
25121    #[doc = "Component ID"]
25122    pub target_component: u8,
25123    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25124    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25125    pub chan9_raw: u16,
25126    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25127    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25128    pub chan10_raw: u16,
25129    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25130    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25131    pub chan11_raw: u16,
25132    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25133    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25134    pub chan12_raw: u16,
25135    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25136    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25137    pub chan13_raw: u16,
25138    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25139    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25140    pub chan14_raw: u16,
25141    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25142    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25143    pub chan15_raw: u16,
25144    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25145    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25146    pub chan16_raw: u16,
25147    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25148    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25149    pub chan17_raw: u16,
25150    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25151    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25152    pub chan18_raw: u16,
25153}
25154impl RC_CHANNELS_OVERRIDE_DATA {
25155    pub const ENCODED_LEN: usize = 38usize;
25156    pub const DEFAULT: Self = Self {
25157        chan1_raw: 0_u16,
25158        chan2_raw: 0_u16,
25159        chan3_raw: 0_u16,
25160        chan4_raw: 0_u16,
25161        chan5_raw: 0_u16,
25162        chan6_raw: 0_u16,
25163        chan7_raw: 0_u16,
25164        chan8_raw: 0_u16,
25165        target_system: 0_u8,
25166        target_component: 0_u8,
25167        chan9_raw: 0_u16,
25168        chan10_raw: 0_u16,
25169        chan11_raw: 0_u16,
25170        chan12_raw: 0_u16,
25171        chan13_raw: 0_u16,
25172        chan14_raw: 0_u16,
25173        chan15_raw: 0_u16,
25174        chan16_raw: 0_u16,
25175        chan17_raw: 0_u16,
25176        chan18_raw: 0_u16,
25177    };
25178    #[cfg(feature = "arbitrary")]
25179    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25180        use arbitrary::{Arbitrary, Unstructured};
25181        let mut buf = [0u8; 1024];
25182        rng.fill_bytes(&mut buf);
25183        let mut unstructured = Unstructured::new(&buf);
25184        Self::arbitrary(&mut unstructured).unwrap_or_default()
25185    }
25186}
25187impl Default for RC_CHANNELS_OVERRIDE_DATA {
25188    fn default() -> Self {
25189        Self::DEFAULT.clone()
25190    }
25191}
25192impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25193    type Message = MavMessage;
25194    const ID: u32 = 70u32;
25195    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25196    const EXTRA_CRC: u8 = 124u8;
25197    const ENCODED_LEN: usize = 38usize;
25198    fn deser(
25199        _version: MavlinkVersion,
25200        __input: &[u8],
25201    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25202        let avail_len = __input.len();
25203        let mut payload_buf = [0; Self::ENCODED_LEN];
25204        let mut buf = if avail_len < Self::ENCODED_LEN {
25205            payload_buf[0..avail_len].copy_from_slice(__input);
25206            Bytes::new(&payload_buf)
25207        } else {
25208            Bytes::new(__input)
25209        };
25210        let mut __struct = Self::default();
25211        __struct.chan1_raw = buf.get_u16_le();
25212        __struct.chan2_raw = buf.get_u16_le();
25213        __struct.chan3_raw = buf.get_u16_le();
25214        __struct.chan4_raw = buf.get_u16_le();
25215        __struct.chan5_raw = buf.get_u16_le();
25216        __struct.chan6_raw = buf.get_u16_le();
25217        __struct.chan7_raw = buf.get_u16_le();
25218        __struct.chan8_raw = buf.get_u16_le();
25219        __struct.target_system = buf.get_u8();
25220        __struct.target_component = buf.get_u8();
25221        __struct.chan9_raw = buf.get_u16_le();
25222        __struct.chan10_raw = buf.get_u16_le();
25223        __struct.chan11_raw = buf.get_u16_le();
25224        __struct.chan12_raw = buf.get_u16_le();
25225        __struct.chan13_raw = buf.get_u16_le();
25226        __struct.chan14_raw = buf.get_u16_le();
25227        __struct.chan15_raw = buf.get_u16_le();
25228        __struct.chan16_raw = buf.get_u16_le();
25229        __struct.chan17_raw = buf.get_u16_le();
25230        __struct.chan18_raw = buf.get_u16_le();
25231        Ok(__struct)
25232    }
25233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25234        let mut __tmp = BytesMut::new(bytes);
25235        #[allow(clippy::absurd_extreme_comparisons)]
25236        #[allow(unused_comparisons)]
25237        if __tmp.remaining() < Self::ENCODED_LEN {
25238            panic!(
25239                "buffer is too small (need {} bytes, but got {})",
25240                Self::ENCODED_LEN,
25241                __tmp.remaining(),
25242            )
25243        }
25244        __tmp.put_u16_le(self.chan1_raw);
25245        __tmp.put_u16_le(self.chan2_raw);
25246        __tmp.put_u16_le(self.chan3_raw);
25247        __tmp.put_u16_le(self.chan4_raw);
25248        __tmp.put_u16_le(self.chan5_raw);
25249        __tmp.put_u16_le(self.chan6_raw);
25250        __tmp.put_u16_le(self.chan7_raw);
25251        __tmp.put_u16_le(self.chan8_raw);
25252        __tmp.put_u8(self.target_system);
25253        __tmp.put_u8(self.target_component);
25254        __tmp.put_u16_le(self.chan9_raw);
25255        __tmp.put_u16_le(self.chan10_raw);
25256        __tmp.put_u16_le(self.chan11_raw);
25257        __tmp.put_u16_le(self.chan12_raw);
25258        __tmp.put_u16_le(self.chan13_raw);
25259        __tmp.put_u16_le(self.chan14_raw);
25260        __tmp.put_u16_le(self.chan15_raw);
25261        __tmp.put_u16_le(self.chan16_raw);
25262        __tmp.put_u16_le(self.chan17_raw);
25263        __tmp.put_u16_le(self.chan18_raw);
25264        if matches!(version, MavlinkVersion::V2) {
25265            let len = __tmp.len();
25266            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25267        } else {
25268            __tmp.len()
25269        }
25270    }
25271}
25272#[doc = "id: 260"]
25273#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
25274#[derive(Debug, Clone, PartialEq)]
25275#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25276#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25277pub struct CAMERA_SETTINGS_DATA {
25278    #[doc = "Timestamp (time since system boot)."]
25279    pub time_boot_ms: u32,
25280    #[doc = "Camera mode"]
25281    pub mode_id: CameraMode,
25282    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
25283    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25284    pub zoomLevel: f32,
25285    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
25286    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25287    pub focusLevel: f32,
25288    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
25289    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25290    pub camera_device_id: u8,
25291}
25292impl CAMERA_SETTINGS_DATA {
25293    pub const ENCODED_LEN: usize = 14usize;
25294    pub const DEFAULT: Self = Self {
25295        time_boot_ms: 0_u32,
25296        mode_id: CameraMode::DEFAULT,
25297        zoomLevel: 0.0_f32,
25298        focusLevel: 0.0_f32,
25299        camera_device_id: 0_u8,
25300    };
25301    #[cfg(feature = "arbitrary")]
25302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25303        use arbitrary::{Arbitrary, Unstructured};
25304        let mut buf = [0u8; 1024];
25305        rng.fill_bytes(&mut buf);
25306        let mut unstructured = Unstructured::new(&buf);
25307        Self::arbitrary(&mut unstructured).unwrap_or_default()
25308    }
25309}
25310impl Default for CAMERA_SETTINGS_DATA {
25311    fn default() -> Self {
25312        Self::DEFAULT.clone()
25313    }
25314}
25315impl MessageData for CAMERA_SETTINGS_DATA {
25316    type Message = MavMessage;
25317    const ID: u32 = 260u32;
25318    const NAME: &'static str = "CAMERA_SETTINGS";
25319    const EXTRA_CRC: u8 = 146u8;
25320    const ENCODED_LEN: usize = 14usize;
25321    fn deser(
25322        _version: MavlinkVersion,
25323        __input: &[u8],
25324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25325        let avail_len = __input.len();
25326        let mut payload_buf = [0; Self::ENCODED_LEN];
25327        let mut buf = if avail_len < Self::ENCODED_LEN {
25328            payload_buf[0..avail_len].copy_from_slice(__input);
25329            Bytes::new(&payload_buf)
25330        } else {
25331            Bytes::new(__input)
25332        };
25333        let mut __struct = Self::default();
25334        __struct.time_boot_ms = buf.get_u32_le();
25335        let tmp = buf.get_u8();
25336        __struct.mode_id =
25337            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25338                enum_type: "CameraMode",
25339                value: tmp as u32,
25340            })?;
25341        __struct.zoomLevel = buf.get_f32_le();
25342        __struct.focusLevel = buf.get_f32_le();
25343        __struct.camera_device_id = buf.get_u8();
25344        Ok(__struct)
25345    }
25346    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25347        let mut __tmp = BytesMut::new(bytes);
25348        #[allow(clippy::absurd_extreme_comparisons)]
25349        #[allow(unused_comparisons)]
25350        if __tmp.remaining() < Self::ENCODED_LEN {
25351            panic!(
25352                "buffer is too small (need {} bytes, but got {})",
25353                Self::ENCODED_LEN,
25354                __tmp.remaining(),
25355            )
25356        }
25357        __tmp.put_u32_le(self.time_boot_ms);
25358        __tmp.put_u8(self.mode_id as u8);
25359        __tmp.put_f32_le(self.zoomLevel);
25360        __tmp.put_f32_le(self.focusLevel);
25361        __tmp.put_u8(self.camera_device_id);
25362        if matches!(version, MavlinkVersion::V2) {
25363            let len = __tmp.len();
25364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25365        } else {
25366            __tmp.len()
25367        }
25368    }
25369}
25370#[doc = "id: 385"]
25371#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
25372#[derive(Debug, Clone, PartialEq)]
25373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25375pub struct TUNNEL_DATA {
25376    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
25377    pub payload_type: MavTunnelPayloadType,
25378    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
25379    pub target_system: u8,
25380    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
25381    pub target_component: u8,
25382    #[doc = "Length of the data transported in payload"]
25383    pub payload_length: u8,
25384    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
25385    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25386    pub payload: [u8; 128],
25387}
25388impl TUNNEL_DATA {
25389    pub const ENCODED_LEN: usize = 133usize;
25390    pub const DEFAULT: Self = Self {
25391        payload_type: MavTunnelPayloadType::DEFAULT,
25392        target_system: 0_u8,
25393        target_component: 0_u8,
25394        payload_length: 0_u8,
25395        payload: [0_u8; 128usize],
25396    };
25397    #[cfg(feature = "arbitrary")]
25398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25399        use arbitrary::{Arbitrary, Unstructured};
25400        let mut buf = [0u8; 1024];
25401        rng.fill_bytes(&mut buf);
25402        let mut unstructured = Unstructured::new(&buf);
25403        Self::arbitrary(&mut unstructured).unwrap_or_default()
25404    }
25405}
25406impl Default for TUNNEL_DATA {
25407    fn default() -> Self {
25408        Self::DEFAULT.clone()
25409    }
25410}
25411impl MessageData for TUNNEL_DATA {
25412    type Message = MavMessage;
25413    const ID: u32 = 385u32;
25414    const NAME: &'static str = "TUNNEL";
25415    const EXTRA_CRC: u8 = 147u8;
25416    const ENCODED_LEN: usize = 133usize;
25417    fn deser(
25418        _version: MavlinkVersion,
25419        __input: &[u8],
25420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25421        let avail_len = __input.len();
25422        let mut payload_buf = [0; Self::ENCODED_LEN];
25423        let mut buf = if avail_len < Self::ENCODED_LEN {
25424            payload_buf[0..avail_len].copy_from_slice(__input);
25425            Bytes::new(&payload_buf)
25426        } else {
25427            Bytes::new(__input)
25428        };
25429        let mut __struct = Self::default();
25430        let tmp = buf.get_u16_le();
25431        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
25432            ::mavlink_core::error::ParserError::InvalidEnum {
25433                enum_type: "MavTunnelPayloadType",
25434                value: tmp as u32,
25435            },
25436        )?;
25437        __struct.target_system = buf.get_u8();
25438        __struct.target_component = buf.get_u8();
25439        __struct.payload_length = buf.get_u8();
25440        for v in &mut __struct.payload {
25441            let val = buf.get_u8();
25442            *v = val;
25443        }
25444        Ok(__struct)
25445    }
25446    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25447        let mut __tmp = BytesMut::new(bytes);
25448        #[allow(clippy::absurd_extreme_comparisons)]
25449        #[allow(unused_comparisons)]
25450        if __tmp.remaining() < Self::ENCODED_LEN {
25451            panic!(
25452                "buffer is too small (need {} bytes, but got {})",
25453                Self::ENCODED_LEN,
25454                __tmp.remaining(),
25455            )
25456        }
25457        __tmp.put_u16_le(self.payload_type as u16);
25458        __tmp.put_u8(self.target_system);
25459        __tmp.put_u8(self.target_component);
25460        __tmp.put_u8(self.payload_length);
25461        for val in &self.payload {
25462            __tmp.put_u8(*val);
25463        }
25464        if matches!(version, MavlinkVersion::V2) {
25465            let len = __tmp.len();
25466            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25467        } else {
25468            __tmp.len()
25469        }
25470    }
25471}
25472#[doc = "id: 12900"]
25473#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
25474#[derive(Debug, Clone, PartialEq)]
25475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25477pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
25478    #[doc = "System ID (0 for broadcast)."]
25479    pub target_system: u8,
25480    #[doc = "Component ID (0 for broadcast)."]
25481    pub target_component: u8,
25482    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
25483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25484    pub id_or_mac: [u8; 20],
25485    #[doc = "Indicates the format for the uas_id field of this message."]
25486    pub id_type: MavOdidIdType,
25487    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
25488    pub ua_type: MavOdidUaType,
25489    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
25490    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25491    pub uas_id: [u8; 20],
25492}
25493impl OPEN_DRONE_ID_BASIC_ID_DATA {
25494    pub const ENCODED_LEN: usize = 44usize;
25495    pub const DEFAULT: Self = Self {
25496        target_system: 0_u8,
25497        target_component: 0_u8,
25498        id_or_mac: [0_u8; 20usize],
25499        id_type: MavOdidIdType::DEFAULT,
25500        ua_type: MavOdidUaType::DEFAULT,
25501        uas_id: [0_u8; 20usize],
25502    };
25503    #[cfg(feature = "arbitrary")]
25504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25505        use arbitrary::{Arbitrary, Unstructured};
25506        let mut buf = [0u8; 1024];
25507        rng.fill_bytes(&mut buf);
25508        let mut unstructured = Unstructured::new(&buf);
25509        Self::arbitrary(&mut unstructured).unwrap_or_default()
25510    }
25511}
25512impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
25513    fn default() -> Self {
25514        Self::DEFAULT.clone()
25515    }
25516}
25517impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
25518    type Message = MavMessage;
25519    const ID: u32 = 12900u32;
25520    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
25521    const EXTRA_CRC: u8 = 114u8;
25522    const ENCODED_LEN: usize = 44usize;
25523    fn deser(
25524        _version: MavlinkVersion,
25525        __input: &[u8],
25526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25527        let avail_len = __input.len();
25528        let mut payload_buf = [0; Self::ENCODED_LEN];
25529        let mut buf = if avail_len < Self::ENCODED_LEN {
25530            payload_buf[0..avail_len].copy_from_slice(__input);
25531            Bytes::new(&payload_buf)
25532        } else {
25533            Bytes::new(__input)
25534        };
25535        let mut __struct = Self::default();
25536        __struct.target_system = buf.get_u8();
25537        __struct.target_component = buf.get_u8();
25538        for v in &mut __struct.id_or_mac {
25539            let val = buf.get_u8();
25540            *v = val;
25541        }
25542        let tmp = buf.get_u8();
25543        __struct.id_type =
25544            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25545                enum_type: "MavOdidIdType",
25546                value: tmp as u32,
25547            })?;
25548        let tmp = buf.get_u8();
25549        __struct.ua_type =
25550            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25551                enum_type: "MavOdidUaType",
25552                value: tmp as u32,
25553            })?;
25554        for v in &mut __struct.uas_id {
25555            let val = buf.get_u8();
25556            *v = val;
25557        }
25558        Ok(__struct)
25559    }
25560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25561        let mut __tmp = BytesMut::new(bytes);
25562        #[allow(clippy::absurd_extreme_comparisons)]
25563        #[allow(unused_comparisons)]
25564        if __tmp.remaining() < Self::ENCODED_LEN {
25565            panic!(
25566                "buffer is too small (need {} bytes, but got {})",
25567                Self::ENCODED_LEN,
25568                __tmp.remaining(),
25569            )
25570        }
25571        __tmp.put_u8(self.target_system);
25572        __tmp.put_u8(self.target_component);
25573        for val in &self.id_or_mac {
25574            __tmp.put_u8(*val);
25575        }
25576        __tmp.put_u8(self.id_type as u8);
25577        __tmp.put_u8(self.ua_type as u8);
25578        for val in &self.uas_id {
25579            __tmp.put_u8(*val);
25580        }
25581        if matches!(version, MavlinkVersion::V2) {
25582            let len = __tmp.len();
25583            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25584        } else {
25585            __tmp.len()
25586        }
25587    }
25588}
25589#[doc = "id: 9000"]
25590#[doc = "Cumulative distance traveled for each reported wheel."]
25591#[derive(Debug, Clone, PartialEq)]
25592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25594pub struct WHEEL_DISTANCE_DATA {
25595    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
25596    pub time_usec: u64,
25597    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
25598    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25599    pub distance: [f64; 16],
25600    #[doc = "Number of wheels reported."]
25601    pub count: u8,
25602}
25603impl WHEEL_DISTANCE_DATA {
25604    pub const ENCODED_LEN: usize = 137usize;
25605    pub const DEFAULT: Self = Self {
25606        time_usec: 0_u64,
25607        distance: [0.0_f64; 16usize],
25608        count: 0_u8,
25609    };
25610    #[cfg(feature = "arbitrary")]
25611    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25612        use arbitrary::{Arbitrary, Unstructured};
25613        let mut buf = [0u8; 1024];
25614        rng.fill_bytes(&mut buf);
25615        let mut unstructured = Unstructured::new(&buf);
25616        Self::arbitrary(&mut unstructured).unwrap_or_default()
25617    }
25618}
25619impl Default for WHEEL_DISTANCE_DATA {
25620    fn default() -> Self {
25621        Self::DEFAULT.clone()
25622    }
25623}
25624impl MessageData for WHEEL_DISTANCE_DATA {
25625    type Message = MavMessage;
25626    const ID: u32 = 9000u32;
25627    const NAME: &'static str = "WHEEL_DISTANCE";
25628    const EXTRA_CRC: u8 = 113u8;
25629    const ENCODED_LEN: usize = 137usize;
25630    fn deser(
25631        _version: MavlinkVersion,
25632        __input: &[u8],
25633    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25634        let avail_len = __input.len();
25635        let mut payload_buf = [0; Self::ENCODED_LEN];
25636        let mut buf = if avail_len < Self::ENCODED_LEN {
25637            payload_buf[0..avail_len].copy_from_slice(__input);
25638            Bytes::new(&payload_buf)
25639        } else {
25640            Bytes::new(__input)
25641        };
25642        let mut __struct = Self::default();
25643        __struct.time_usec = buf.get_u64_le();
25644        for v in &mut __struct.distance {
25645            let val = buf.get_f64_le();
25646            *v = val;
25647        }
25648        __struct.count = buf.get_u8();
25649        Ok(__struct)
25650    }
25651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25652        let mut __tmp = BytesMut::new(bytes);
25653        #[allow(clippy::absurd_extreme_comparisons)]
25654        #[allow(unused_comparisons)]
25655        if __tmp.remaining() < Self::ENCODED_LEN {
25656            panic!(
25657                "buffer is too small (need {} bytes, but got {})",
25658                Self::ENCODED_LEN,
25659                __tmp.remaining(),
25660            )
25661        }
25662        __tmp.put_u64_le(self.time_usec);
25663        for val in &self.distance {
25664            __tmp.put_f64_le(*val);
25665        }
25666        __tmp.put_u8(self.count);
25667        if matches!(version, MavlinkVersion::V2) {
25668            let len = __tmp.len();
25669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25670        } else {
25671            __tmp.len()
25672        }
25673    }
25674}
25675#[doc = "id: 330"]
25676#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
25677#[derive(Debug, Clone, PartialEq)]
25678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25680pub struct OBSTACLE_DISTANCE_DATA {
25681    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25682    pub time_usec: u64,
25683    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
25684    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25685    pub distances: [u16; 72],
25686    #[doc = "Minimum distance the sensor can measure."]
25687    pub min_distance: u16,
25688    #[doc = "Maximum distance the sensor can measure."]
25689    pub max_distance: u16,
25690    #[doc = "Class id of the distance sensor type."]
25691    pub sensor_type: MavDistanceSensor,
25692    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
25693    pub increment: u8,
25694    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
25695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25696    pub increment_f: f32,
25697    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
25698    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25699    pub angle_offset: f32,
25700    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
25701    #[cfg_attr(feature = "serde", serde(default))]
25702    pub frame: MavFrame,
25703}
25704impl OBSTACLE_DISTANCE_DATA {
25705    pub const ENCODED_LEN: usize = 167usize;
25706    pub const DEFAULT: Self = Self {
25707        time_usec: 0_u64,
25708        distances: [0_u16; 72usize],
25709        min_distance: 0_u16,
25710        max_distance: 0_u16,
25711        sensor_type: MavDistanceSensor::DEFAULT,
25712        increment: 0_u8,
25713        increment_f: 0.0_f32,
25714        angle_offset: 0.0_f32,
25715        frame: MavFrame::DEFAULT,
25716    };
25717    #[cfg(feature = "arbitrary")]
25718    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25719        use arbitrary::{Arbitrary, Unstructured};
25720        let mut buf = [0u8; 1024];
25721        rng.fill_bytes(&mut buf);
25722        let mut unstructured = Unstructured::new(&buf);
25723        Self::arbitrary(&mut unstructured).unwrap_or_default()
25724    }
25725}
25726impl Default for OBSTACLE_DISTANCE_DATA {
25727    fn default() -> Self {
25728        Self::DEFAULT.clone()
25729    }
25730}
25731impl MessageData for OBSTACLE_DISTANCE_DATA {
25732    type Message = MavMessage;
25733    const ID: u32 = 330u32;
25734    const NAME: &'static str = "OBSTACLE_DISTANCE";
25735    const EXTRA_CRC: u8 = 23u8;
25736    const ENCODED_LEN: usize = 167usize;
25737    fn deser(
25738        _version: MavlinkVersion,
25739        __input: &[u8],
25740    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25741        let avail_len = __input.len();
25742        let mut payload_buf = [0; Self::ENCODED_LEN];
25743        let mut buf = if avail_len < Self::ENCODED_LEN {
25744            payload_buf[0..avail_len].copy_from_slice(__input);
25745            Bytes::new(&payload_buf)
25746        } else {
25747            Bytes::new(__input)
25748        };
25749        let mut __struct = Self::default();
25750        __struct.time_usec = buf.get_u64_le();
25751        for v in &mut __struct.distances {
25752            let val = buf.get_u16_le();
25753            *v = val;
25754        }
25755        __struct.min_distance = buf.get_u16_le();
25756        __struct.max_distance = buf.get_u16_le();
25757        let tmp = buf.get_u8();
25758        __struct.sensor_type =
25759            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25760                enum_type: "MavDistanceSensor",
25761                value: tmp as u32,
25762            })?;
25763        __struct.increment = buf.get_u8();
25764        __struct.increment_f = buf.get_f32_le();
25765        __struct.angle_offset = buf.get_f32_le();
25766        let tmp = buf.get_u8();
25767        __struct.frame =
25768            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25769                enum_type: "MavFrame",
25770                value: tmp as u32,
25771            })?;
25772        Ok(__struct)
25773    }
25774    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25775        let mut __tmp = BytesMut::new(bytes);
25776        #[allow(clippy::absurd_extreme_comparisons)]
25777        #[allow(unused_comparisons)]
25778        if __tmp.remaining() < Self::ENCODED_LEN {
25779            panic!(
25780                "buffer is too small (need {} bytes, but got {})",
25781                Self::ENCODED_LEN,
25782                __tmp.remaining(),
25783            )
25784        }
25785        __tmp.put_u64_le(self.time_usec);
25786        for val in &self.distances {
25787            __tmp.put_u16_le(*val);
25788        }
25789        __tmp.put_u16_le(self.min_distance);
25790        __tmp.put_u16_le(self.max_distance);
25791        __tmp.put_u8(self.sensor_type as u8);
25792        __tmp.put_u8(self.increment);
25793        __tmp.put_f32_le(self.increment_f);
25794        __tmp.put_f32_le(self.angle_offset);
25795        __tmp.put_u8(self.frame as u8);
25796        if matches!(version, MavlinkVersion::V2) {
25797            let len = __tmp.len();
25798            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25799        } else {
25800            __tmp.len()
25801        }
25802    }
25803}
25804#[doc = "id: 91"]
25805#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
25806#[derive(Debug, Clone, PartialEq)]
25807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25809pub struct HIL_CONTROLS_DATA {
25810    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25811    pub time_usec: u64,
25812    #[doc = "Control output -1 .. 1"]
25813    pub roll_ailerons: f32,
25814    #[doc = "Control output -1 .. 1"]
25815    pub pitch_elevator: f32,
25816    #[doc = "Control output -1 .. 1"]
25817    pub yaw_rudder: f32,
25818    #[doc = "Throttle 0 .. 1"]
25819    pub throttle: f32,
25820    #[doc = "Aux 1, -1 .. 1"]
25821    pub aux1: f32,
25822    #[doc = "Aux 2, -1 .. 1"]
25823    pub aux2: f32,
25824    #[doc = "Aux 3, -1 .. 1"]
25825    pub aux3: f32,
25826    #[doc = "Aux 4, -1 .. 1"]
25827    pub aux4: f32,
25828    #[doc = "System mode."]
25829    pub mode: MavMode,
25830    #[doc = "Navigation mode (MAV_NAV_MODE)"]
25831    pub nav_mode: u8,
25832}
25833impl HIL_CONTROLS_DATA {
25834    pub const ENCODED_LEN: usize = 42usize;
25835    pub const DEFAULT: Self = Self {
25836        time_usec: 0_u64,
25837        roll_ailerons: 0.0_f32,
25838        pitch_elevator: 0.0_f32,
25839        yaw_rudder: 0.0_f32,
25840        throttle: 0.0_f32,
25841        aux1: 0.0_f32,
25842        aux2: 0.0_f32,
25843        aux3: 0.0_f32,
25844        aux4: 0.0_f32,
25845        mode: MavMode::DEFAULT,
25846        nav_mode: 0_u8,
25847    };
25848    #[cfg(feature = "arbitrary")]
25849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25850        use arbitrary::{Arbitrary, Unstructured};
25851        let mut buf = [0u8; 1024];
25852        rng.fill_bytes(&mut buf);
25853        let mut unstructured = Unstructured::new(&buf);
25854        Self::arbitrary(&mut unstructured).unwrap_or_default()
25855    }
25856}
25857impl Default for HIL_CONTROLS_DATA {
25858    fn default() -> Self {
25859        Self::DEFAULT.clone()
25860    }
25861}
25862impl MessageData for HIL_CONTROLS_DATA {
25863    type Message = MavMessage;
25864    const ID: u32 = 91u32;
25865    const NAME: &'static str = "HIL_CONTROLS";
25866    const EXTRA_CRC: u8 = 63u8;
25867    const ENCODED_LEN: usize = 42usize;
25868    fn deser(
25869        _version: MavlinkVersion,
25870        __input: &[u8],
25871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25872        let avail_len = __input.len();
25873        let mut payload_buf = [0; Self::ENCODED_LEN];
25874        let mut buf = if avail_len < Self::ENCODED_LEN {
25875            payload_buf[0..avail_len].copy_from_slice(__input);
25876            Bytes::new(&payload_buf)
25877        } else {
25878            Bytes::new(__input)
25879        };
25880        let mut __struct = Self::default();
25881        __struct.time_usec = buf.get_u64_le();
25882        __struct.roll_ailerons = buf.get_f32_le();
25883        __struct.pitch_elevator = buf.get_f32_le();
25884        __struct.yaw_rudder = buf.get_f32_le();
25885        __struct.throttle = buf.get_f32_le();
25886        __struct.aux1 = buf.get_f32_le();
25887        __struct.aux2 = buf.get_f32_le();
25888        __struct.aux3 = buf.get_f32_le();
25889        __struct.aux4 = buf.get_f32_le();
25890        let tmp = buf.get_u8();
25891        __struct.mode =
25892            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25893                enum_type: "MavMode",
25894                value: tmp as u32,
25895            })?;
25896        __struct.nav_mode = buf.get_u8();
25897        Ok(__struct)
25898    }
25899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25900        let mut __tmp = BytesMut::new(bytes);
25901        #[allow(clippy::absurd_extreme_comparisons)]
25902        #[allow(unused_comparisons)]
25903        if __tmp.remaining() < Self::ENCODED_LEN {
25904            panic!(
25905                "buffer is too small (need {} bytes, but got {})",
25906                Self::ENCODED_LEN,
25907                __tmp.remaining(),
25908            )
25909        }
25910        __tmp.put_u64_le(self.time_usec);
25911        __tmp.put_f32_le(self.roll_ailerons);
25912        __tmp.put_f32_le(self.pitch_elevator);
25913        __tmp.put_f32_le(self.yaw_rudder);
25914        __tmp.put_f32_le(self.throttle);
25915        __tmp.put_f32_le(self.aux1);
25916        __tmp.put_f32_le(self.aux2);
25917        __tmp.put_f32_le(self.aux3);
25918        __tmp.put_f32_le(self.aux4);
25919        __tmp.put_u8(self.mode as u8);
25920        __tmp.put_u8(self.nav_mode);
25921        if matches!(version, MavlinkVersion::V2) {
25922            let len = __tmp.len();
25923            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25924        } else {
25925            __tmp.len()
25926        }
25927    }
25928}
25929#[doc = "id: 310"]
25930#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
25931#[derive(Debug, Clone, PartialEq)]
25932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25934pub struct UAVCAN_NODE_STATUS_DATA {
25935    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25936    pub time_usec: u64,
25937    #[doc = "Time since the start-up of the node."]
25938    pub uptime_sec: u32,
25939    #[doc = "Vendor-specific status information."]
25940    pub vendor_specific_status_code: u16,
25941    #[doc = "Generalized node health status."]
25942    pub health: UavcanNodeHealth,
25943    #[doc = "Generalized operating mode."]
25944    pub mode: UavcanNodeMode,
25945    #[doc = "Not used currently."]
25946    pub sub_mode: u8,
25947}
25948impl UAVCAN_NODE_STATUS_DATA {
25949    pub const ENCODED_LEN: usize = 17usize;
25950    pub const DEFAULT: Self = Self {
25951        time_usec: 0_u64,
25952        uptime_sec: 0_u32,
25953        vendor_specific_status_code: 0_u16,
25954        health: UavcanNodeHealth::DEFAULT,
25955        mode: UavcanNodeMode::DEFAULT,
25956        sub_mode: 0_u8,
25957    };
25958    #[cfg(feature = "arbitrary")]
25959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25960        use arbitrary::{Arbitrary, Unstructured};
25961        let mut buf = [0u8; 1024];
25962        rng.fill_bytes(&mut buf);
25963        let mut unstructured = Unstructured::new(&buf);
25964        Self::arbitrary(&mut unstructured).unwrap_or_default()
25965    }
25966}
25967impl Default for UAVCAN_NODE_STATUS_DATA {
25968    fn default() -> Self {
25969        Self::DEFAULT.clone()
25970    }
25971}
25972impl MessageData for UAVCAN_NODE_STATUS_DATA {
25973    type Message = MavMessage;
25974    const ID: u32 = 310u32;
25975    const NAME: &'static str = "UAVCAN_NODE_STATUS";
25976    const EXTRA_CRC: u8 = 28u8;
25977    const ENCODED_LEN: usize = 17usize;
25978    fn deser(
25979        _version: MavlinkVersion,
25980        __input: &[u8],
25981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25982        let avail_len = __input.len();
25983        let mut payload_buf = [0; Self::ENCODED_LEN];
25984        let mut buf = if avail_len < Self::ENCODED_LEN {
25985            payload_buf[0..avail_len].copy_from_slice(__input);
25986            Bytes::new(&payload_buf)
25987        } else {
25988            Bytes::new(__input)
25989        };
25990        let mut __struct = Self::default();
25991        __struct.time_usec = buf.get_u64_le();
25992        __struct.uptime_sec = buf.get_u32_le();
25993        __struct.vendor_specific_status_code = buf.get_u16_le();
25994        let tmp = buf.get_u8();
25995        __struct.health =
25996            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25997                enum_type: "UavcanNodeHealth",
25998                value: tmp as u32,
25999            })?;
26000        let tmp = buf.get_u8();
26001        __struct.mode =
26002            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26003                enum_type: "UavcanNodeMode",
26004                value: tmp as u32,
26005            })?;
26006        __struct.sub_mode = buf.get_u8();
26007        Ok(__struct)
26008    }
26009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26010        let mut __tmp = BytesMut::new(bytes);
26011        #[allow(clippy::absurd_extreme_comparisons)]
26012        #[allow(unused_comparisons)]
26013        if __tmp.remaining() < Self::ENCODED_LEN {
26014            panic!(
26015                "buffer is too small (need {} bytes, but got {})",
26016                Self::ENCODED_LEN,
26017                __tmp.remaining(),
26018            )
26019        }
26020        __tmp.put_u64_le(self.time_usec);
26021        __tmp.put_u32_le(self.uptime_sec);
26022        __tmp.put_u16_le(self.vendor_specific_status_code);
26023        __tmp.put_u8(self.health as u8);
26024        __tmp.put_u8(self.mode as u8);
26025        __tmp.put_u8(self.sub_mode);
26026        if matches!(version, MavlinkVersion::V2) {
26027            let len = __tmp.len();
26028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26029        } else {
26030            __tmp.len()
26031        }
26032    }
26033}
26034#[doc = "id: 360"]
26035#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
26036#[derive(Debug, Clone, PartialEq)]
26037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26039pub struct ORBIT_EXECUTION_STATUS_DATA {
26040    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26041    pub time_usec: u64,
26042    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
26043    pub radius: f32,
26044    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
26045    pub x: i32,
26046    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
26047    pub y: i32,
26048    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
26049    pub z: f32,
26050    #[doc = "The coordinate system of the fields: x, y, z."]
26051    pub frame: MavFrame,
26052}
26053impl ORBIT_EXECUTION_STATUS_DATA {
26054    pub const ENCODED_LEN: usize = 25usize;
26055    pub const DEFAULT: Self = Self {
26056        time_usec: 0_u64,
26057        radius: 0.0_f32,
26058        x: 0_i32,
26059        y: 0_i32,
26060        z: 0.0_f32,
26061        frame: MavFrame::DEFAULT,
26062    };
26063    #[cfg(feature = "arbitrary")]
26064    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26065        use arbitrary::{Arbitrary, Unstructured};
26066        let mut buf = [0u8; 1024];
26067        rng.fill_bytes(&mut buf);
26068        let mut unstructured = Unstructured::new(&buf);
26069        Self::arbitrary(&mut unstructured).unwrap_or_default()
26070    }
26071}
26072impl Default for ORBIT_EXECUTION_STATUS_DATA {
26073    fn default() -> Self {
26074        Self::DEFAULT.clone()
26075    }
26076}
26077impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
26078    type Message = MavMessage;
26079    const ID: u32 = 360u32;
26080    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
26081    const EXTRA_CRC: u8 = 11u8;
26082    const ENCODED_LEN: usize = 25usize;
26083    fn deser(
26084        _version: MavlinkVersion,
26085        __input: &[u8],
26086    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26087        let avail_len = __input.len();
26088        let mut payload_buf = [0; Self::ENCODED_LEN];
26089        let mut buf = if avail_len < Self::ENCODED_LEN {
26090            payload_buf[0..avail_len].copy_from_slice(__input);
26091            Bytes::new(&payload_buf)
26092        } else {
26093            Bytes::new(__input)
26094        };
26095        let mut __struct = Self::default();
26096        __struct.time_usec = buf.get_u64_le();
26097        __struct.radius = buf.get_f32_le();
26098        __struct.x = buf.get_i32_le();
26099        __struct.y = buf.get_i32_le();
26100        __struct.z = buf.get_f32_le();
26101        let tmp = buf.get_u8();
26102        __struct.frame =
26103            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26104                enum_type: "MavFrame",
26105                value: tmp as u32,
26106            })?;
26107        Ok(__struct)
26108    }
26109    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26110        let mut __tmp = BytesMut::new(bytes);
26111        #[allow(clippy::absurd_extreme_comparisons)]
26112        #[allow(unused_comparisons)]
26113        if __tmp.remaining() < Self::ENCODED_LEN {
26114            panic!(
26115                "buffer is too small (need {} bytes, but got {})",
26116                Self::ENCODED_LEN,
26117                __tmp.remaining(),
26118            )
26119        }
26120        __tmp.put_u64_le(self.time_usec);
26121        __tmp.put_f32_le(self.radius);
26122        __tmp.put_i32_le(self.x);
26123        __tmp.put_i32_le(self.y);
26124        __tmp.put_f32_le(self.z);
26125        __tmp.put_u8(self.frame as u8);
26126        if matches!(version, MavlinkVersion::V2) {
26127            let len = __tmp.len();
26128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26129        } else {
26130            __tmp.len()
26131        }
26132    }
26133}
26134#[doc = "id: 12904"]
26135#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
26136#[derive(Debug, Clone, PartialEq)]
26137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26139pub struct OPEN_DRONE_ID_SYSTEM_DATA {
26140    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
26141    pub operator_latitude: i32,
26142    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
26143    pub operator_longitude: i32,
26144    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
26145    pub area_ceiling: f32,
26146    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
26147    pub area_floor: f32,
26148    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
26149    pub operator_altitude_geo: f32,
26150    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
26151    pub timestamp: u32,
26152    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
26153    pub area_count: u16,
26154    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
26155    pub area_radius: u16,
26156    #[doc = "System ID (0 for broadcast)."]
26157    pub target_system: u8,
26158    #[doc = "Component ID (0 for broadcast)."]
26159    pub target_component: u8,
26160    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
26161    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26162    pub id_or_mac: [u8; 20],
26163    #[doc = "Specifies the operator location type."]
26164    pub operator_location_type: MavOdidOperatorLocationType,
26165    #[doc = "Specifies the classification type of the UA."]
26166    pub classification_type: MavOdidClassificationType,
26167    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
26168    pub category_eu: MavOdidCategoryEu,
26169    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
26170    pub class_eu: MavOdidClassEu,
26171}
26172impl OPEN_DRONE_ID_SYSTEM_DATA {
26173    pub const ENCODED_LEN: usize = 54usize;
26174    pub const DEFAULT: Self = Self {
26175        operator_latitude: 0_i32,
26176        operator_longitude: 0_i32,
26177        area_ceiling: 0.0_f32,
26178        area_floor: 0.0_f32,
26179        operator_altitude_geo: 0.0_f32,
26180        timestamp: 0_u32,
26181        area_count: 0_u16,
26182        area_radius: 0_u16,
26183        target_system: 0_u8,
26184        target_component: 0_u8,
26185        id_or_mac: [0_u8; 20usize],
26186        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
26187        classification_type: MavOdidClassificationType::DEFAULT,
26188        category_eu: MavOdidCategoryEu::DEFAULT,
26189        class_eu: MavOdidClassEu::DEFAULT,
26190    };
26191    #[cfg(feature = "arbitrary")]
26192    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26193        use arbitrary::{Arbitrary, Unstructured};
26194        let mut buf = [0u8; 1024];
26195        rng.fill_bytes(&mut buf);
26196        let mut unstructured = Unstructured::new(&buf);
26197        Self::arbitrary(&mut unstructured).unwrap_or_default()
26198    }
26199}
26200impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
26201    fn default() -> Self {
26202        Self::DEFAULT.clone()
26203    }
26204}
26205impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
26206    type Message = MavMessage;
26207    const ID: u32 = 12904u32;
26208    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
26209    const EXTRA_CRC: u8 = 77u8;
26210    const ENCODED_LEN: usize = 54usize;
26211    fn deser(
26212        _version: MavlinkVersion,
26213        __input: &[u8],
26214    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26215        let avail_len = __input.len();
26216        let mut payload_buf = [0; Self::ENCODED_LEN];
26217        let mut buf = if avail_len < Self::ENCODED_LEN {
26218            payload_buf[0..avail_len].copy_from_slice(__input);
26219            Bytes::new(&payload_buf)
26220        } else {
26221            Bytes::new(__input)
26222        };
26223        let mut __struct = Self::default();
26224        __struct.operator_latitude = buf.get_i32_le();
26225        __struct.operator_longitude = buf.get_i32_le();
26226        __struct.area_ceiling = buf.get_f32_le();
26227        __struct.area_floor = buf.get_f32_le();
26228        __struct.operator_altitude_geo = buf.get_f32_le();
26229        __struct.timestamp = buf.get_u32_le();
26230        __struct.area_count = buf.get_u16_le();
26231        __struct.area_radius = buf.get_u16_le();
26232        __struct.target_system = buf.get_u8();
26233        __struct.target_component = buf.get_u8();
26234        for v in &mut __struct.id_or_mac {
26235            let val = buf.get_u8();
26236            *v = val;
26237        }
26238        let tmp = buf.get_u8();
26239        __struct.operator_location_type =
26240            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26241                enum_type: "MavOdidOperatorLocationType",
26242                value: tmp as u32,
26243            })?;
26244        let tmp = buf.get_u8();
26245        __struct.classification_type =
26246            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26247                enum_type: "MavOdidClassificationType",
26248                value: tmp as u32,
26249            })?;
26250        let tmp = buf.get_u8();
26251        __struct.category_eu =
26252            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26253                enum_type: "MavOdidCategoryEu",
26254                value: tmp as u32,
26255            })?;
26256        let tmp = buf.get_u8();
26257        __struct.class_eu =
26258            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26259                enum_type: "MavOdidClassEu",
26260                value: tmp as u32,
26261            })?;
26262        Ok(__struct)
26263    }
26264    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26265        let mut __tmp = BytesMut::new(bytes);
26266        #[allow(clippy::absurd_extreme_comparisons)]
26267        #[allow(unused_comparisons)]
26268        if __tmp.remaining() < Self::ENCODED_LEN {
26269            panic!(
26270                "buffer is too small (need {} bytes, but got {})",
26271                Self::ENCODED_LEN,
26272                __tmp.remaining(),
26273            )
26274        }
26275        __tmp.put_i32_le(self.operator_latitude);
26276        __tmp.put_i32_le(self.operator_longitude);
26277        __tmp.put_f32_le(self.area_ceiling);
26278        __tmp.put_f32_le(self.area_floor);
26279        __tmp.put_f32_le(self.operator_altitude_geo);
26280        __tmp.put_u32_le(self.timestamp);
26281        __tmp.put_u16_le(self.area_count);
26282        __tmp.put_u16_le(self.area_radius);
26283        __tmp.put_u8(self.target_system);
26284        __tmp.put_u8(self.target_component);
26285        for val in &self.id_or_mac {
26286            __tmp.put_u8(*val);
26287        }
26288        __tmp.put_u8(self.operator_location_type as u8);
26289        __tmp.put_u8(self.classification_type as u8);
26290        __tmp.put_u8(self.category_eu as u8);
26291        __tmp.put_u8(self.class_eu as u8);
26292        if matches!(version, MavlinkVersion::V2) {
26293            let len = __tmp.len();
26294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26295        } else {
26296            __tmp.len()
26297        }
26298    }
26299}
26300#[doc = "id: 49"]
26301#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
26302#[derive(Debug, Clone, PartialEq)]
26303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26304#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26305pub struct GPS_GLOBAL_ORIGIN_DATA {
26306    #[doc = "Latitude (WGS84)"]
26307    pub latitude: i32,
26308    #[doc = "Longitude (WGS84)"]
26309    pub longitude: i32,
26310    #[doc = "Altitude (MSL). Positive for up."]
26311    pub altitude: i32,
26312    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26313    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26314    pub time_usec: u64,
26315}
26316impl GPS_GLOBAL_ORIGIN_DATA {
26317    pub const ENCODED_LEN: usize = 20usize;
26318    pub const DEFAULT: Self = Self {
26319        latitude: 0_i32,
26320        longitude: 0_i32,
26321        altitude: 0_i32,
26322        time_usec: 0_u64,
26323    };
26324    #[cfg(feature = "arbitrary")]
26325    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26326        use arbitrary::{Arbitrary, Unstructured};
26327        let mut buf = [0u8; 1024];
26328        rng.fill_bytes(&mut buf);
26329        let mut unstructured = Unstructured::new(&buf);
26330        Self::arbitrary(&mut unstructured).unwrap_or_default()
26331    }
26332}
26333impl Default for GPS_GLOBAL_ORIGIN_DATA {
26334    fn default() -> Self {
26335        Self::DEFAULT.clone()
26336    }
26337}
26338impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
26339    type Message = MavMessage;
26340    const ID: u32 = 49u32;
26341    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
26342    const EXTRA_CRC: u8 = 39u8;
26343    const ENCODED_LEN: usize = 20usize;
26344    fn deser(
26345        _version: MavlinkVersion,
26346        __input: &[u8],
26347    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26348        let avail_len = __input.len();
26349        let mut payload_buf = [0; Self::ENCODED_LEN];
26350        let mut buf = if avail_len < Self::ENCODED_LEN {
26351            payload_buf[0..avail_len].copy_from_slice(__input);
26352            Bytes::new(&payload_buf)
26353        } else {
26354            Bytes::new(__input)
26355        };
26356        let mut __struct = Self::default();
26357        __struct.latitude = buf.get_i32_le();
26358        __struct.longitude = buf.get_i32_le();
26359        __struct.altitude = buf.get_i32_le();
26360        __struct.time_usec = buf.get_u64_le();
26361        Ok(__struct)
26362    }
26363    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26364        let mut __tmp = BytesMut::new(bytes);
26365        #[allow(clippy::absurd_extreme_comparisons)]
26366        #[allow(unused_comparisons)]
26367        if __tmp.remaining() < Self::ENCODED_LEN {
26368            panic!(
26369                "buffer is too small (need {} bytes, but got {})",
26370                Self::ENCODED_LEN,
26371                __tmp.remaining(),
26372            )
26373        }
26374        __tmp.put_i32_le(self.latitude);
26375        __tmp.put_i32_le(self.longitude);
26376        __tmp.put_i32_le(self.altitude);
26377        __tmp.put_u64_le(self.time_usec);
26378        if matches!(version, MavlinkVersion::V2) {
26379            let len = __tmp.len();
26380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26381        } else {
26382            __tmp.len()
26383        }
26384    }
26385}
26386#[doc = "id: 12919"]
26387#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
26388#[derive(Debug, Clone, PartialEq)]
26389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26391pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
26392    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
26393    pub operator_latitude: i32,
26394    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
26395    pub operator_longitude: i32,
26396    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
26397    pub operator_altitude_geo: f32,
26398    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
26399    pub timestamp: u32,
26400    #[doc = "System ID (0 for broadcast)."]
26401    pub target_system: u8,
26402    #[doc = "Component ID (0 for broadcast)."]
26403    pub target_component: u8,
26404}
26405impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
26406    pub const ENCODED_LEN: usize = 18usize;
26407    pub const DEFAULT: Self = Self {
26408        operator_latitude: 0_i32,
26409        operator_longitude: 0_i32,
26410        operator_altitude_geo: 0.0_f32,
26411        timestamp: 0_u32,
26412        target_system: 0_u8,
26413        target_component: 0_u8,
26414    };
26415    #[cfg(feature = "arbitrary")]
26416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26417        use arbitrary::{Arbitrary, Unstructured};
26418        let mut buf = [0u8; 1024];
26419        rng.fill_bytes(&mut buf);
26420        let mut unstructured = Unstructured::new(&buf);
26421        Self::arbitrary(&mut unstructured).unwrap_or_default()
26422    }
26423}
26424impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
26425    fn default() -> Self {
26426        Self::DEFAULT.clone()
26427    }
26428}
26429impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
26430    type Message = MavMessage;
26431    const ID: u32 = 12919u32;
26432    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
26433    const EXTRA_CRC: u8 = 7u8;
26434    const ENCODED_LEN: usize = 18usize;
26435    fn deser(
26436        _version: MavlinkVersion,
26437        __input: &[u8],
26438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26439        let avail_len = __input.len();
26440        let mut payload_buf = [0; Self::ENCODED_LEN];
26441        let mut buf = if avail_len < Self::ENCODED_LEN {
26442            payload_buf[0..avail_len].copy_from_slice(__input);
26443            Bytes::new(&payload_buf)
26444        } else {
26445            Bytes::new(__input)
26446        };
26447        let mut __struct = Self::default();
26448        __struct.operator_latitude = buf.get_i32_le();
26449        __struct.operator_longitude = buf.get_i32_le();
26450        __struct.operator_altitude_geo = buf.get_f32_le();
26451        __struct.timestamp = buf.get_u32_le();
26452        __struct.target_system = buf.get_u8();
26453        __struct.target_component = buf.get_u8();
26454        Ok(__struct)
26455    }
26456    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26457        let mut __tmp = BytesMut::new(bytes);
26458        #[allow(clippy::absurd_extreme_comparisons)]
26459        #[allow(unused_comparisons)]
26460        if __tmp.remaining() < Self::ENCODED_LEN {
26461            panic!(
26462                "buffer is too small (need {} bytes, but got {})",
26463                Self::ENCODED_LEN,
26464                __tmp.remaining(),
26465            )
26466        }
26467        __tmp.put_i32_le(self.operator_latitude);
26468        __tmp.put_i32_le(self.operator_longitude);
26469        __tmp.put_f32_le(self.operator_altitude_geo);
26470        __tmp.put_u32_le(self.timestamp);
26471        __tmp.put_u8(self.target_system);
26472        __tmp.put_u8(self.target_component);
26473        if matches!(version, MavlinkVersion::V2) {
26474            let len = __tmp.len();
26475            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26476        } else {
26477            __tmp.len()
26478        }
26479    }
26480}
26481#[doc = "id: 114"]
26482#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
26483#[derive(Debug, Clone, PartialEq)]
26484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26486pub struct HIL_OPTICAL_FLOW_DATA {
26487    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26488    pub time_usec: u64,
26489    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
26490    pub integration_time_us: u32,
26491    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
26492    pub integrated_x: f32,
26493    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
26494    pub integrated_y: f32,
26495    #[doc = "RH rotation around X axis"]
26496    pub integrated_xgyro: f32,
26497    #[doc = "RH rotation around Y axis"]
26498    pub integrated_ygyro: f32,
26499    #[doc = "RH rotation around Z axis"]
26500    pub integrated_zgyro: f32,
26501    #[doc = "Time since the distance was sampled."]
26502    pub time_delta_distance_us: u32,
26503    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
26504    pub distance: f32,
26505    #[doc = "Temperature"]
26506    pub temperature: i16,
26507    #[doc = "Sensor ID"]
26508    pub sensor_id: u8,
26509    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
26510    pub quality: u8,
26511}
26512impl HIL_OPTICAL_FLOW_DATA {
26513    pub const ENCODED_LEN: usize = 44usize;
26514    pub const DEFAULT: Self = Self {
26515        time_usec: 0_u64,
26516        integration_time_us: 0_u32,
26517        integrated_x: 0.0_f32,
26518        integrated_y: 0.0_f32,
26519        integrated_xgyro: 0.0_f32,
26520        integrated_ygyro: 0.0_f32,
26521        integrated_zgyro: 0.0_f32,
26522        time_delta_distance_us: 0_u32,
26523        distance: 0.0_f32,
26524        temperature: 0_i16,
26525        sensor_id: 0_u8,
26526        quality: 0_u8,
26527    };
26528    #[cfg(feature = "arbitrary")]
26529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26530        use arbitrary::{Arbitrary, Unstructured};
26531        let mut buf = [0u8; 1024];
26532        rng.fill_bytes(&mut buf);
26533        let mut unstructured = Unstructured::new(&buf);
26534        Self::arbitrary(&mut unstructured).unwrap_or_default()
26535    }
26536}
26537impl Default for HIL_OPTICAL_FLOW_DATA {
26538    fn default() -> Self {
26539        Self::DEFAULT.clone()
26540    }
26541}
26542impl MessageData for HIL_OPTICAL_FLOW_DATA {
26543    type Message = MavMessage;
26544    const ID: u32 = 114u32;
26545    const NAME: &'static str = "HIL_OPTICAL_FLOW";
26546    const EXTRA_CRC: u8 = 237u8;
26547    const ENCODED_LEN: usize = 44usize;
26548    fn deser(
26549        _version: MavlinkVersion,
26550        __input: &[u8],
26551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26552        let avail_len = __input.len();
26553        let mut payload_buf = [0; Self::ENCODED_LEN];
26554        let mut buf = if avail_len < Self::ENCODED_LEN {
26555            payload_buf[0..avail_len].copy_from_slice(__input);
26556            Bytes::new(&payload_buf)
26557        } else {
26558            Bytes::new(__input)
26559        };
26560        let mut __struct = Self::default();
26561        __struct.time_usec = buf.get_u64_le();
26562        __struct.integration_time_us = buf.get_u32_le();
26563        __struct.integrated_x = buf.get_f32_le();
26564        __struct.integrated_y = buf.get_f32_le();
26565        __struct.integrated_xgyro = buf.get_f32_le();
26566        __struct.integrated_ygyro = buf.get_f32_le();
26567        __struct.integrated_zgyro = buf.get_f32_le();
26568        __struct.time_delta_distance_us = buf.get_u32_le();
26569        __struct.distance = buf.get_f32_le();
26570        __struct.temperature = buf.get_i16_le();
26571        __struct.sensor_id = buf.get_u8();
26572        __struct.quality = buf.get_u8();
26573        Ok(__struct)
26574    }
26575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26576        let mut __tmp = BytesMut::new(bytes);
26577        #[allow(clippy::absurd_extreme_comparisons)]
26578        #[allow(unused_comparisons)]
26579        if __tmp.remaining() < Self::ENCODED_LEN {
26580            panic!(
26581                "buffer is too small (need {} bytes, but got {})",
26582                Self::ENCODED_LEN,
26583                __tmp.remaining(),
26584            )
26585        }
26586        __tmp.put_u64_le(self.time_usec);
26587        __tmp.put_u32_le(self.integration_time_us);
26588        __tmp.put_f32_le(self.integrated_x);
26589        __tmp.put_f32_le(self.integrated_y);
26590        __tmp.put_f32_le(self.integrated_xgyro);
26591        __tmp.put_f32_le(self.integrated_ygyro);
26592        __tmp.put_f32_le(self.integrated_zgyro);
26593        __tmp.put_u32_le(self.time_delta_distance_us);
26594        __tmp.put_f32_le(self.distance);
26595        __tmp.put_i16_le(self.temperature);
26596        __tmp.put_u8(self.sensor_id);
26597        __tmp.put_u8(self.quality);
26598        if matches!(version, MavlinkVersion::V2) {
26599            let len = __tmp.len();
26600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26601        } else {
26602            __tmp.len()
26603        }
26604    }
26605}
26606#[doc = "id: 21"]
26607#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
26608#[derive(Debug, Clone, PartialEq)]
26609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26611pub struct PARAM_REQUEST_LIST_DATA {
26612    #[doc = "System ID"]
26613    pub target_system: u8,
26614    #[doc = "Component ID"]
26615    pub target_component: u8,
26616}
26617impl PARAM_REQUEST_LIST_DATA {
26618    pub const ENCODED_LEN: usize = 2usize;
26619    pub const DEFAULT: Self = Self {
26620        target_system: 0_u8,
26621        target_component: 0_u8,
26622    };
26623    #[cfg(feature = "arbitrary")]
26624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26625        use arbitrary::{Arbitrary, Unstructured};
26626        let mut buf = [0u8; 1024];
26627        rng.fill_bytes(&mut buf);
26628        let mut unstructured = Unstructured::new(&buf);
26629        Self::arbitrary(&mut unstructured).unwrap_or_default()
26630    }
26631}
26632impl Default for PARAM_REQUEST_LIST_DATA {
26633    fn default() -> Self {
26634        Self::DEFAULT.clone()
26635    }
26636}
26637impl MessageData for PARAM_REQUEST_LIST_DATA {
26638    type Message = MavMessage;
26639    const ID: u32 = 21u32;
26640    const NAME: &'static str = "PARAM_REQUEST_LIST";
26641    const EXTRA_CRC: u8 = 159u8;
26642    const ENCODED_LEN: usize = 2usize;
26643    fn deser(
26644        _version: MavlinkVersion,
26645        __input: &[u8],
26646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26647        let avail_len = __input.len();
26648        let mut payload_buf = [0; Self::ENCODED_LEN];
26649        let mut buf = if avail_len < Self::ENCODED_LEN {
26650            payload_buf[0..avail_len].copy_from_slice(__input);
26651            Bytes::new(&payload_buf)
26652        } else {
26653            Bytes::new(__input)
26654        };
26655        let mut __struct = Self::default();
26656        __struct.target_system = buf.get_u8();
26657        __struct.target_component = buf.get_u8();
26658        Ok(__struct)
26659    }
26660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26661        let mut __tmp = BytesMut::new(bytes);
26662        #[allow(clippy::absurd_extreme_comparisons)]
26663        #[allow(unused_comparisons)]
26664        if __tmp.remaining() < Self::ENCODED_LEN {
26665            panic!(
26666                "buffer is too small (need {} bytes, but got {})",
26667                Self::ENCODED_LEN,
26668                __tmp.remaining(),
26669            )
26670        }
26671        __tmp.put_u8(self.target_system);
26672        __tmp.put_u8(self.target_component);
26673        if matches!(version, MavlinkVersion::V2) {
26674            let len = __tmp.len();
26675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26676        } else {
26677            __tmp.len()
26678        }
26679    }
26680}
26681#[doc = "id: 335"]
26682#[doc = "Status of the Iridium SBD link."]
26683#[derive(Debug, Clone, PartialEq)]
26684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26686pub struct ISBD_LINK_STATUS_DATA {
26687    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26688    pub timestamp: u64,
26689    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26690    pub last_heartbeat: u64,
26691    #[doc = "Number of failed SBD sessions."]
26692    pub failed_sessions: u16,
26693    #[doc = "Number of successful SBD sessions."]
26694    pub successful_sessions: u16,
26695    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
26696    pub signal_quality: u8,
26697    #[doc = "1: Ring call pending, 0: No call pending."]
26698    pub ring_pending: u8,
26699    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
26700    pub tx_session_pending: u8,
26701    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
26702    pub rx_session_pending: u8,
26703}
26704impl ISBD_LINK_STATUS_DATA {
26705    pub const ENCODED_LEN: usize = 24usize;
26706    pub const DEFAULT: Self = Self {
26707        timestamp: 0_u64,
26708        last_heartbeat: 0_u64,
26709        failed_sessions: 0_u16,
26710        successful_sessions: 0_u16,
26711        signal_quality: 0_u8,
26712        ring_pending: 0_u8,
26713        tx_session_pending: 0_u8,
26714        rx_session_pending: 0_u8,
26715    };
26716    #[cfg(feature = "arbitrary")]
26717    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26718        use arbitrary::{Arbitrary, Unstructured};
26719        let mut buf = [0u8; 1024];
26720        rng.fill_bytes(&mut buf);
26721        let mut unstructured = Unstructured::new(&buf);
26722        Self::arbitrary(&mut unstructured).unwrap_or_default()
26723    }
26724}
26725impl Default for ISBD_LINK_STATUS_DATA {
26726    fn default() -> Self {
26727        Self::DEFAULT.clone()
26728    }
26729}
26730impl MessageData for ISBD_LINK_STATUS_DATA {
26731    type Message = MavMessage;
26732    const ID: u32 = 335u32;
26733    const NAME: &'static str = "ISBD_LINK_STATUS";
26734    const EXTRA_CRC: u8 = 225u8;
26735    const ENCODED_LEN: usize = 24usize;
26736    fn deser(
26737        _version: MavlinkVersion,
26738        __input: &[u8],
26739    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26740        let avail_len = __input.len();
26741        let mut payload_buf = [0; Self::ENCODED_LEN];
26742        let mut buf = if avail_len < Self::ENCODED_LEN {
26743            payload_buf[0..avail_len].copy_from_slice(__input);
26744            Bytes::new(&payload_buf)
26745        } else {
26746            Bytes::new(__input)
26747        };
26748        let mut __struct = Self::default();
26749        __struct.timestamp = buf.get_u64_le();
26750        __struct.last_heartbeat = buf.get_u64_le();
26751        __struct.failed_sessions = buf.get_u16_le();
26752        __struct.successful_sessions = buf.get_u16_le();
26753        __struct.signal_quality = buf.get_u8();
26754        __struct.ring_pending = buf.get_u8();
26755        __struct.tx_session_pending = buf.get_u8();
26756        __struct.rx_session_pending = buf.get_u8();
26757        Ok(__struct)
26758    }
26759    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26760        let mut __tmp = BytesMut::new(bytes);
26761        #[allow(clippy::absurd_extreme_comparisons)]
26762        #[allow(unused_comparisons)]
26763        if __tmp.remaining() < Self::ENCODED_LEN {
26764            panic!(
26765                "buffer is too small (need {} bytes, but got {})",
26766                Self::ENCODED_LEN,
26767                __tmp.remaining(),
26768            )
26769        }
26770        __tmp.put_u64_le(self.timestamp);
26771        __tmp.put_u64_le(self.last_heartbeat);
26772        __tmp.put_u16_le(self.failed_sessions);
26773        __tmp.put_u16_le(self.successful_sessions);
26774        __tmp.put_u8(self.signal_quality);
26775        __tmp.put_u8(self.ring_pending);
26776        __tmp.put_u8(self.tx_session_pending);
26777        __tmp.put_u8(self.rx_session_pending);
26778        if matches!(version, MavlinkVersion::V2) {
26779            let len = __tmp.len();
26780            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26781        } else {
26782            __tmp.len()
26783        }
26784    }
26785}
26786#[doc = "id: 23"]
26787#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
26788#[derive(Debug, Clone, PartialEq)]
26789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26790#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26791pub struct PARAM_SET_DATA {
26792    #[doc = "Onboard parameter value"]
26793    pub param_value: f32,
26794    #[doc = "System ID"]
26795    pub target_system: u8,
26796    #[doc = "Component ID"]
26797    pub target_component: u8,
26798    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26799    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26800    pub param_id: [u8; 16],
26801    #[doc = "Onboard parameter type."]
26802    pub param_type: MavParamType,
26803}
26804impl PARAM_SET_DATA {
26805    pub const ENCODED_LEN: usize = 23usize;
26806    pub const DEFAULT: Self = Self {
26807        param_value: 0.0_f32,
26808        target_system: 0_u8,
26809        target_component: 0_u8,
26810        param_id: [0_u8; 16usize],
26811        param_type: MavParamType::DEFAULT,
26812    };
26813    #[cfg(feature = "arbitrary")]
26814    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26815        use arbitrary::{Arbitrary, Unstructured};
26816        let mut buf = [0u8; 1024];
26817        rng.fill_bytes(&mut buf);
26818        let mut unstructured = Unstructured::new(&buf);
26819        Self::arbitrary(&mut unstructured).unwrap_or_default()
26820    }
26821}
26822impl Default for PARAM_SET_DATA {
26823    fn default() -> Self {
26824        Self::DEFAULT.clone()
26825    }
26826}
26827impl MessageData for PARAM_SET_DATA {
26828    type Message = MavMessage;
26829    const ID: u32 = 23u32;
26830    const NAME: &'static str = "PARAM_SET";
26831    const EXTRA_CRC: u8 = 168u8;
26832    const ENCODED_LEN: usize = 23usize;
26833    fn deser(
26834        _version: MavlinkVersion,
26835        __input: &[u8],
26836    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26837        let avail_len = __input.len();
26838        let mut payload_buf = [0; Self::ENCODED_LEN];
26839        let mut buf = if avail_len < Self::ENCODED_LEN {
26840            payload_buf[0..avail_len].copy_from_slice(__input);
26841            Bytes::new(&payload_buf)
26842        } else {
26843            Bytes::new(__input)
26844        };
26845        let mut __struct = Self::default();
26846        __struct.param_value = buf.get_f32_le();
26847        __struct.target_system = buf.get_u8();
26848        __struct.target_component = buf.get_u8();
26849        for v in &mut __struct.param_id {
26850            let val = buf.get_u8();
26851            *v = val;
26852        }
26853        let tmp = buf.get_u8();
26854        __struct.param_type =
26855            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26856                enum_type: "MavParamType",
26857                value: tmp as u32,
26858            })?;
26859        Ok(__struct)
26860    }
26861    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26862        let mut __tmp = BytesMut::new(bytes);
26863        #[allow(clippy::absurd_extreme_comparisons)]
26864        #[allow(unused_comparisons)]
26865        if __tmp.remaining() < Self::ENCODED_LEN {
26866            panic!(
26867                "buffer is too small (need {} bytes, but got {})",
26868                Self::ENCODED_LEN,
26869                __tmp.remaining(),
26870            )
26871        }
26872        __tmp.put_f32_le(self.param_value);
26873        __tmp.put_u8(self.target_system);
26874        __tmp.put_u8(self.target_component);
26875        for val in &self.param_id {
26876            __tmp.put_u8(*val);
26877        }
26878        __tmp.put_u8(self.param_type as u8);
26879        if matches!(version, MavlinkVersion::V2) {
26880            let len = __tmp.len();
26881            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26882        } else {
26883            __tmp.len()
26884        }
26885    }
26886}
26887#[doc = "id: 26"]
26888#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26889#[derive(Debug, Clone, PartialEq)]
26890#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26891#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26892pub struct SCALED_IMU_DATA {
26893    #[doc = "Timestamp (time since system boot)."]
26894    pub time_boot_ms: u32,
26895    #[doc = "X acceleration"]
26896    pub xacc: i16,
26897    #[doc = "Y acceleration"]
26898    pub yacc: i16,
26899    #[doc = "Z acceleration"]
26900    pub zacc: i16,
26901    #[doc = "Angular speed around X axis"]
26902    pub xgyro: i16,
26903    #[doc = "Angular speed around Y axis"]
26904    pub ygyro: i16,
26905    #[doc = "Angular speed around Z axis"]
26906    pub zgyro: i16,
26907    #[doc = "X Magnetic field"]
26908    pub xmag: i16,
26909    #[doc = "Y Magnetic field"]
26910    pub ymag: i16,
26911    #[doc = "Z Magnetic field"]
26912    pub zmag: i16,
26913    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26914    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26915    pub temperature: i16,
26916}
26917impl SCALED_IMU_DATA {
26918    pub const ENCODED_LEN: usize = 24usize;
26919    pub const DEFAULT: Self = Self {
26920        time_boot_ms: 0_u32,
26921        xacc: 0_i16,
26922        yacc: 0_i16,
26923        zacc: 0_i16,
26924        xgyro: 0_i16,
26925        ygyro: 0_i16,
26926        zgyro: 0_i16,
26927        xmag: 0_i16,
26928        ymag: 0_i16,
26929        zmag: 0_i16,
26930        temperature: 0_i16,
26931    };
26932    #[cfg(feature = "arbitrary")]
26933    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26934        use arbitrary::{Arbitrary, Unstructured};
26935        let mut buf = [0u8; 1024];
26936        rng.fill_bytes(&mut buf);
26937        let mut unstructured = Unstructured::new(&buf);
26938        Self::arbitrary(&mut unstructured).unwrap_or_default()
26939    }
26940}
26941impl Default for SCALED_IMU_DATA {
26942    fn default() -> Self {
26943        Self::DEFAULT.clone()
26944    }
26945}
26946impl MessageData for SCALED_IMU_DATA {
26947    type Message = MavMessage;
26948    const ID: u32 = 26u32;
26949    const NAME: &'static str = "SCALED_IMU";
26950    const EXTRA_CRC: u8 = 170u8;
26951    const ENCODED_LEN: usize = 24usize;
26952    fn deser(
26953        _version: MavlinkVersion,
26954        __input: &[u8],
26955    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26956        let avail_len = __input.len();
26957        let mut payload_buf = [0; Self::ENCODED_LEN];
26958        let mut buf = if avail_len < Self::ENCODED_LEN {
26959            payload_buf[0..avail_len].copy_from_slice(__input);
26960            Bytes::new(&payload_buf)
26961        } else {
26962            Bytes::new(__input)
26963        };
26964        let mut __struct = Self::default();
26965        __struct.time_boot_ms = buf.get_u32_le();
26966        __struct.xacc = buf.get_i16_le();
26967        __struct.yacc = buf.get_i16_le();
26968        __struct.zacc = buf.get_i16_le();
26969        __struct.xgyro = buf.get_i16_le();
26970        __struct.ygyro = buf.get_i16_le();
26971        __struct.zgyro = buf.get_i16_le();
26972        __struct.xmag = buf.get_i16_le();
26973        __struct.ymag = buf.get_i16_le();
26974        __struct.zmag = buf.get_i16_le();
26975        __struct.temperature = buf.get_i16_le();
26976        Ok(__struct)
26977    }
26978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26979        let mut __tmp = BytesMut::new(bytes);
26980        #[allow(clippy::absurd_extreme_comparisons)]
26981        #[allow(unused_comparisons)]
26982        if __tmp.remaining() < Self::ENCODED_LEN {
26983            panic!(
26984                "buffer is too small (need {} bytes, but got {})",
26985                Self::ENCODED_LEN,
26986                __tmp.remaining(),
26987            )
26988        }
26989        __tmp.put_u32_le(self.time_boot_ms);
26990        __tmp.put_i16_le(self.xacc);
26991        __tmp.put_i16_le(self.yacc);
26992        __tmp.put_i16_le(self.zacc);
26993        __tmp.put_i16_le(self.xgyro);
26994        __tmp.put_i16_le(self.ygyro);
26995        __tmp.put_i16_le(self.zgyro);
26996        __tmp.put_i16_le(self.xmag);
26997        __tmp.put_i16_le(self.ymag);
26998        __tmp.put_i16_le(self.zmag);
26999        __tmp.put_i16_le(self.temperature);
27000        if matches!(version, MavlinkVersion::V2) {
27001            let len = __tmp.len();
27002            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27003        } else {
27004            __tmp.len()
27005        }
27006    }
27007}
27008#[doc = "id: 12918"]
27009#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
27010#[derive(Debug, Clone, PartialEq)]
27011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27013pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
27014    #[doc = "Status level indicating if arming is allowed."]
27015    pub status: MavOdidArmStatus,
27016    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
27017    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27018    pub error: [u8; 50],
27019}
27020impl OPEN_DRONE_ID_ARM_STATUS_DATA {
27021    pub const ENCODED_LEN: usize = 51usize;
27022    pub const DEFAULT: Self = Self {
27023        status: MavOdidArmStatus::DEFAULT,
27024        error: [0_u8; 50usize],
27025    };
27026    #[cfg(feature = "arbitrary")]
27027    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27028        use arbitrary::{Arbitrary, Unstructured};
27029        let mut buf = [0u8; 1024];
27030        rng.fill_bytes(&mut buf);
27031        let mut unstructured = Unstructured::new(&buf);
27032        Self::arbitrary(&mut unstructured).unwrap_or_default()
27033    }
27034}
27035impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
27036    fn default() -> Self {
27037        Self::DEFAULT.clone()
27038    }
27039}
27040impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
27041    type Message = MavMessage;
27042    const ID: u32 = 12918u32;
27043    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
27044    const EXTRA_CRC: u8 = 139u8;
27045    const ENCODED_LEN: usize = 51usize;
27046    fn deser(
27047        _version: MavlinkVersion,
27048        __input: &[u8],
27049    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27050        let avail_len = __input.len();
27051        let mut payload_buf = [0; Self::ENCODED_LEN];
27052        let mut buf = if avail_len < Self::ENCODED_LEN {
27053            payload_buf[0..avail_len].copy_from_slice(__input);
27054            Bytes::new(&payload_buf)
27055        } else {
27056            Bytes::new(__input)
27057        };
27058        let mut __struct = Self::default();
27059        let tmp = buf.get_u8();
27060        __struct.status =
27061            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27062                enum_type: "MavOdidArmStatus",
27063                value: tmp as u32,
27064            })?;
27065        for v in &mut __struct.error {
27066            let val = buf.get_u8();
27067            *v = val;
27068        }
27069        Ok(__struct)
27070    }
27071    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27072        let mut __tmp = BytesMut::new(bytes);
27073        #[allow(clippy::absurd_extreme_comparisons)]
27074        #[allow(unused_comparisons)]
27075        if __tmp.remaining() < Self::ENCODED_LEN {
27076            panic!(
27077                "buffer is too small (need {} bytes, but got {})",
27078                Self::ENCODED_LEN,
27079                __tmp.remaining(),
27080            )
27081        }
27082        __tmp.put_u8(self.status as u8);
27083        for val in &self.error {
27084            __tmp.put_u8(*val);
27085        }
27086        if matches!(version, MavlinkVersion::V2) {
27087            let len = __tmp.len();
27088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27089        } else {
27090            __tmp.len()
27091        }
27092    }
27093}
27094#[doc = "id: 136"]
27095#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
27096#[derive(Debug, Clone, PartialEq)]
27097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27099pub struct TERRAIN_REPORT_DATA {
27100    #[doc = "Latitude"]
27101    pub lat: i32,
27102    #[doc = "Longitude"]
27103    pub lon: i32,
27104    #[doc = "Terrain height MSL"]
27105    pub terrain_height: f32,
27106    #[doc = "Current vehicle height above lat/lon terrain height"]
27107    pub current_height: f32,
27108    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
27109    pub spacing: u16,
27110    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
27111    pub pending: u16,
27112    #[doc = "Number of 4x4 terrain blocks in memory"]
27113    pub loaded: u16,
27114}
27115impl TERRAIN_REPORT_DATA {
27116    pub const ENCODED_LEN: usize = 22usize;
27117    pub const DEFAULT: Self = Self {
27118        lat: 0_i32,
27119        lon: 0_i32,
27120        terrain_height: 0.0_f32,
27121        current_height: 0.0_f32,
27122        spacing: 0_u16,
27123        pending: 0_u16,
27124        loaded: 0_u16,
27125    };
27126    #[cfg(feature = "arbitrary")]
27127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27128        use arbitrary::{Arbitrary, Unstructured};
27129        let mut buf = [0u8; 1024];
27130        rng.fill_bytes(&mut buf);
27131        let mut unstructured = Unstructured::new(&buf);
27132        Self::arbitrary(&mut unstructured).unwrap_or_default()
27133    }
27134}
27135impl Default for TERRAIN_REPORT_DATA {
27136    fn default() -> Self {
27137        Self::DEFAULT.clone()
27138    }
27139}
27140impl MessageData for TERRAIN_REPORT_DATA {
27141    type Message = MavMessage;
27142    const ID: u32 = 136u32;
27143    const NAME: &'static str = "TERRAIN_REPORT";
27144    const EXTRA_CRC: u8 = 1u8;
27145    const ENCODED_LEN: usize = 22usize;
27146    fn deser(
27147        _version: MavlinkVersion,
27148        __input: &[u8],
27149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27150        let avail_len = __input.len();
27151        let mut payload_buf = [0; Self::ENCODED_LEN];
27152        let mut buf = if avail_len < Self::ENCODED_LEN {
27153            payload_buf[0..avail_len].copy_from_slice(__input);
27154            Bytes::new(&payload_buf)
27155        } else {
27156            Bytes::new(__input)
27157        };
27158        let mut __struct = Self::default();
27159        __struct.lat = buf.get_i32_le();
27160        __struct.lon = buf.get_i32_le();
27161        __struct.terrain_height = buf.get_f32_le();
27162        __struct.current_height = buf.get_f32_le();
27163        __struct.spacing = buf.get_u16_le();
27164        __struct.pending = buf.get_u16_le();
27165        __struct.loaded = buf.get_u16_le();
27166        Ok(__struct)
27167    }
27168    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27169        let mut __tmp = BytesMut::new(bytes);
27170        #[allow(clippy::absurd_extreme_comparisons)]
27171        #[allow(unused_comparisons)]
27172        if __tmp.remaining() < Self::ENCODED_LEN {
27173            panic!(
27174                "buffer is too small (need {} bytes, but got {})",
27175                Self::ENCODED_LEN,
27176                __tmp.remaining(),
27177            )
27178        }
27179        __tmp.put_i32_le(self.lat);
27180        __tmp.put_i32_le(self.lon);
27181        __tmp.put_f32_le(self.terrain_height);
27182        __tmp.put_f32_le(self.current_height);
27183        __tmp.put_u16_le(self.spacing);
27184        __tmp.put_u16_le(self.pending);
27185        __tmp.put_u16_le(self.loaded);
27186        if matches!(version, MavlinkVersion::V2) {
27187            let len = __tmp.len();
27188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27189        } else {
27190            __tmp.len()
27191        }
27192    }
27193}
27194#[doc = "id: 244"]
27195#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
27196#[derive(Debug, Clone, PartialEq)]
27197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27199pub struct MESSAGE_INTERVAL_DATA {
27200    #[doc = "0 indicates the interval at which it is sent."]
27201    pub interval_us: i32,
27202    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
27203    pub message_id: u16,
27204}
27205impl MESSAGE_INTERVAL_DATA {
27206    pub const ENCODED_LEN: usize = 6usize;
27207    pub const DEFAULT: Self = Self {
27208        interval_us: 0_i32,
27209        message_id: 0_u16,
27210    };
27211    #[cfg(feature = "arbitrary")]
27212    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27213        use arbitrary::{Arbitrary, Unstructured};
27214        let mut buf = [0u8; 1024];
27215        rng.fill_bytes(&mut buf);
27216        let mut unstructured = Unstructured::new(&buf);
27217        Self::arbitrary(&mut unstructured).unwrap_or_default()
27218    }
27219}
27220impl Default for MESSAGE_INTERVAL_DATA {
27221    fn default() -> Self {
27222        Self::DEFAULT.clone()
27223    }
27224}
27225impl MessageData for MESSAGE_INTERVAL_DATA {
27226    type Message = MavMessage;
27227    const ID: u32 = 244u32;
27228    const NAME: &'static str = "MESSAGE_INTERVAL";
27229    const EXTRA_CRC: u8 = 95u8;
27230    const ENCODED_LEN: usize = 6usize;
27231    fn deser(
27232        _version: MavlinkVersion,
27233        __input: &[u8],
27234    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27235        let avail_len = __input.len();
27236        let mut payload_buf = [0; Self::ENCODED_LEN];
27237        let mut buf = if avail_len < Self::ENCODED_LEN {
27238            payload_buf[0..avail_len].copy_from_slice(__input);
27239            Bytes::new(&payload_buf)
27240        } else {
27241            Bytes::new(__input)
27242        };
27243        let mut __struct = Self::default();
27244        __struct.interval_us = buf.get_i32_le();
27245        __struct.message_id = buf.get_u16_le();
27246        Ok(__struct)
27247    }
27248    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27249        let mut __tmp = BytesMut::new(bytes);
27250        #[allow(clippy::absurd_extreme_comparisons)]
27251        #[allow(unused_comparisons)]
27252        if __tmp.remaining() < Self::ENCODED_LEN {
27253            panic!(
27254                "buffer is too small (need {} bytes, but got {})",
27255                Self::ENCODED_LEN,
27256                __tmp.remaining(),
27257            )
27258        }
27259        __tmp.put_i32_le(self.interval_us);
27260        __tmp.put_u16_le(self.message_id);
27261        if matches!(version, MavlinkVersion::V2) {
27262            let len = __tmp.len();
27263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27264        } else {
27265            __tmp.len()
27266        }
27267    }
27268}
27269#[doc = "id: 36"]
27270#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27271#[derive(Debug, Clone, PartialEq)]
27272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27274pub struct SERVO_OUTPUT_RAW_DATA {
27275    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27276    pub time_usec: u32,
27277    #[doc = "Servo output 1 value"]
27278    pub servo1_raw: u16,
27279    #[doc = "Servo output 2 value"]
27280    pub servo2_raw: u16,
27281    #[doc = "Servo output 3 value"]
27282    pub servo3_raw: u16,
27283    #[doc = "Servo output 4 value"]
27284    pub servo4_raw: u16,
27285    #[doc = "Servo output 5 value"]
27286    pub servo5_raw: u16,
27287    #[doc = "Servo output 6 value"]
27288    pub servo6_raw: u16,
27289    #[doc = "Servo output 7 value"]
27290    pub servo7_raw: u16,
27291    #[doc = "Servo output 8 value"]
27292    pub servo8_raw: u16,
27293    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27294    pub port: u8,
27295    #[doc = "Servo output 9 value"]
27296    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27297    pub servo9_raw: u16,
27298    #[doc = "Servo output 10 value"]
27299    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27300    pub servo10_raw: u16,
27301    #[doc = "Servo output 11 value"]
27302    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27303    pub servo11_raw: u16,
27304    #[doc = "Servo output 12 value"]
27305    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27306    pub servo12_raw: u16,
27307    #[doc = "Servo output 13 value"]
27308    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27309    pub servo13_raw: u16,
27310    #[doc = "Servo output 14 value"]
27311    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27312    pub servo14_raw: u16,
27313    #[doc = "Servo output 15 value"]
27314    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27315    pub servo15_raw: u16,
27316    #[doc = "Servo output 16 value"]
27317    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27318    pub servo16_raw: u16,
27319}
27320impl SERVO_OUTPUT_RAW_DATA {
27321    pub const ENCODED_LEN: usize = 37usize;
27322    pub const DEFAULT: Self = Self {
27323        time_usec: 0_u32,
27324        servo1_raw: 0_u16,
27325        servo2_raw: 0_u16,
27326        servo3_raw: 0_u16,
27327        servo4_raw: 0_u16,
27328        servo5_raw: 0_u16,
27329        servo6_raw: 0_u16,
27330        servo7_raw: 0_u16,
27331        servo8_raw: 0_u16,
27332        port: 0_u8,
27333        servo9_raw: 0_u16,
27334        servo10_raw: 0_u16,
27335        servo11_raw: 0_u16,
27336        servo12_raw: 0_u16,
27337        servo13_raw: 0_u16,
27338        servo14_raw: 0_u16,
27339        servo15_raw: 0_u16,
27340        servo16_raw: 0_u16,
27341    };
27342    #[cfg(feature = "arbitrary")]
27343    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27344        use arbitrary::{Arbitrary, Unstructured};
27345        let mut buf = [0u8; 1024];
27346        rng.fill_bytes(&mut buf);
27347        let mut unstructured = Unstructured::new(&buf);
27348        Self::arbitrary(&mut unstructured).unwrap_or_default()
27349    }
27350}
27351impl Default for SERVO_OUTPUT_RAW_DATA {
27352    fn default() -> Self {
27353        Self::DEFAULT.clone()
27354    }
27355}
27356impl MessageData for SERVO_OUTPUT_RAW_DATA {
27357    type Message = MavMessage;
27358    const ID: u32 = 36u32;
27359    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27360    const EXTRA_CRC: u8 = 222u8;
27361    const ENCODED_LEN: usize = 37usize;
27362    fn deser(
27363        _version: MavlinkVersion,
27364        __input: &[u8],
27365    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27366        let avail_len = __input.len();
27367        let mut payload_buf = [0; Self::ENCODED_LEN];
27368        let mut buf = if avail_len < Self::ENCODED_LEN {
27369            payload_buf[0..avail_len].copy_from_slice(__input);
27370            Bytes::new(&payload_buf)
27371        } else {
27372            Bytes::new(__input)
27373        };
27374        let mut __struct = Self::default();
27375        __struct.time_usec = buf.get_u32_le();
27376        __struct.servo1_raw = buf.get_u16_le();
27377        __struct.servo2_raw = buf.get_u16_le();
27378        __struct.servo3_raw = buf.get_u16_le();
27379        __struct.servo4_raw = buf.get_u16_le();
27380        __struct.servo5_raw = buf.get_u16_le();
27381        __struct.servo6_raw = buf.get_u16_le();
27382        __struct.servo7_raw = buf.get_u16_le();
27383        __struct.servo8_raw = buf.get_u16_le();
27384        __struct.port = buf.get_u8();
27385        __struct.servo9_raw = buf.get_u16_le();
27386        __struct.servo10_raw = buf.get_u16_le();
27387        __struct.servo11_raw = buf.get_u16_le();
27388        __struct.servo12_raw = buf.get_u16_le();
27389        __struct.servo13_raw = buf.get_u16_le();
27390        __struct.servo14_raw = buf.get_u16_le();
27391        __struct.servo15_raw = buf.get_u16_le();
27392        __struct.servo16_raw = buf.get_u16_le();
27393        Ok(__struct)
27394    }
27395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27396        let mut __tmp = BytesMut::new(bytes);
27397        #[allow(clippy::absurd_extreme_comparisons)]
27398        #[allow(unused_comparisons)]
27399        if __tmp.remaining() < Self::ENCODED_LEN {
27400            panic!(
27401                "buffer is too small (need {} bytes, but got {})",
27402                Self::ENCODED_LEN,
27403                __tmp.remaining(),
27404            )
27405        }
27406        __tmp.put_u32_le(self.time_usec);
27407        __tmp.put_u16_le(self.servo1_raw);
27408        __tmp.put_u16_le(self.servo2_raw);
27409        __tmp.put_u16_le(self.servo3_raw);
27410        __tmp.put_u16_le(self.servo4_raw);
27411        __tmp.put_u16_le(self.servo5_raw);
27412        __tmp.put_u16_le(self.servo6_raw);
27413        __tmp.put_u16_le(self.servo7_raw);
27414        __tmp.put_u16_le(self.servo8_raw);
27415        __tmp.put_u8(self.port);
27416        __tmp.put_u16_le(self.servo9_raw);
27417        __tmp.put_u16_le(self.servo10_raw);
27418        __tmp.put_u16_le(self.servo11_raw);
27419        __tmp.put_u16_le(self.servo12_raw);
27420        __tmp.put_u16_le(self.servo13_raw);
27421        __tmp.put_u16_le(self.servo14_raw);
27422        __tmp.put_u16_le(self.servo15_raw);
27423        __tmp.put_u16_le(self.servo16_raw);
27424        if matches!(version, MavlinkVersion::V2) {
27425            let len = __tmp.len();
27426            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27427        } else {
27428            __tmp.len()
27429        }
27430    }
27431}
27432#[doc = "id: 105"]
27433#[doc = "The IMU readings in SI units in NED body frame."]
27434#[derive(Debug, Clone, PartialEq)]
27435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27437pub struct HIGHRES_IMU_DATA {
27438    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27439    pub time_usec: u64,
27440    #[doc = "X acceleration"]
27441    pub xacc: f32,
27442    #[doc = "Y acceleration"]
27443    pub yacc: f32,
27444    #[doc = "Z acceleration"]
27445    pub zacc: f32,
27446    #[doc = "Angular speed around X axis"]
27447    pub xgyro: f32,
27448    #[doc = "Angular speed around Y axis"]
27449    pub ygyro: f32,
27450    #[doc = "Angular speed around Z axis"]
27451    pub zgyro: f32,
27452    #[doc = "X Magnetic field"]
27453    pub xmag: f32,
27454    #[doc = "Y Magnetic field"]
27455    pub ymag: f32,
27456    #[doc = "Z Magnetic field"]
27457    pub zmag: f32,
27458    #[doc = "Absolute pressure"]
27459    pub abs_pressure: f32,
27460    #[doc = "Differential pressure"]
27461    pub diff_pressure: f32,
27462    #[doc = "Altitude calculated from pressure"]
27463    pub pressure_alt: f32,
27464    #[doc = "Temperature"]
27465    pub temperature: f32,
27466    #[doc = "Bitmap for fields that have updated since last message"]
27467    pub fields_updated: HighresImuUpdatedFlags,
27468    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
27469    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27470    pub id: u8,
27471}
27472impl HIGHRES_IMU_DATA {
27473    pub const ENCODED_LEN: usize = 63usize;
27474    pub const DEFAULT: Self = Self {
27475        time_usec: 0_u64,
27476        xacc: 0.0_f32,
27477        yacc: 0.0_f32,
27478        zacc: 0.0_f32,
27479        xgyro: 0.0_f32,
27480        ygyro: 0.0_f32,
27481        zgyro: 0.0_f32,
27482        xmag: 0.0_f32,
27483        ymag: 0.0_f32,
27484        zmag: 0.0_f32,
27485        abs_pressure: 0.0_f32,
27486        diff_pressure: 0.0_f32,
27487        pressure_alt: 0.0_f32,
27488        temperature: 0.0_f32,
27489        fields_updated: HighresImuUpdatedFlags::DEFAULT,
27490        id: 0_u8,
27491    };
27492    #[cfg(feature = "arbitrary")]
27493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27494        use arbitrary::{Arbitrary, Unstructured};
27495        let mut buf = [0u8; 1024];
27496        rng.fill_bytes(&mut buf);
27497        let mut unstructured = Unstructured::new(&buf);
27498        Self::arbitrary(&mut unstructured).unwrap_or_default()
27499    }
27500}
27501impl Default for HIGHRES_IMU_DATA {
27502    fn default() -> Self {
27503        Self::DEFAULT.clone()
27504    }
27505}
27506impl MessageData for HIGHRES_IMU_DATA {
27507    type Message = MavMessage;
27508    const ID: u32 = 105u32;
27509    const NAME: &'static str = "HIGHRES_IMU";
27510    const EXTRA_CRC: u8 = 93u8;
27511    const ENCODED_LEN: usize = 63usize;
27512    fn deser(
27513        _version: MavlinkVersion,
27514        __input: &[u8],
27515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27516        let avail_len = __input.len();
27517        let mut payload_buf = [0; Self::ENCODED_LEN];
27518        let mut buf = if avail_len < Self::ENCODED_LEN {
27519            payload_buf[0..avail_len].copy_from_slice(__input);
27520            Bytes::new(&payload_buf)
27521        } else {
27522            Bytes::new(__input)
27523        };
27524        let mut __struct = Self::default();
27525        __struct.time_usec = buf.get_u64_le();
27526        __struct.xacc = buf.get_f32_le();
27527        __struct.yacc = buf.get_f32_le();
27528        __struct.zacc = buf.get_f32_le();
27529        __struct.xgyro = buf.get_f32_le();
27530        __struct.ygyro = buf.get_f32_le();
27531        __struct.zgyro = buf.get_f32_le();
27532        __struct.xmag = buf.get_f32_le();
27533        __struct.ymag = buf.get_f32_le();
27534        __struct.zmag = buf.get_f32_le();
27535        __struct.abs_pressure = buf.get_f32_le();
27536        __struct.diff_pressure = buf.get_f32_le();
27537        __struct.pressure_alt = buf.get_f32_le();
27538        __struct.temperature = buf.get_f32_le();
27539        let tmp = buf.get_u16_le();
27540        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
27541            tmp & HighresImuUpdatedFlags::all().bits(),
27542        )
27543        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27544            flag_type: "HighresImuUpdatedFlags",
27545            value: tmp as u32,
27546        })?;
27547        __struct.id = buf.get_u8();
27548        Ok(__struct)
27549    }
27550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27551        let mut __tmp = BytesMut::new(bytes);
27552        #[allow(clippy::absurd_extreme_comparisons)]
27553        #[allow(unused_comparisons)]
27554        if __tmp.remaining() < Self::ENCODED_LEN {
27555            panic!(
27556                "buffer is too small (need {} bytes, but got {})",
27557                Self::ENCODED_LEN,
27558                __tmp.remaining(),
27559            )
27560        }
27561        __tmp.put_u64_le(self.time_usec);
27562        __tmp.put_f32_le(self.xacc);
27563        __tmp.put_f32_le(self.yacc);
27564        __tmp.put_f32_le(self.zacc);
27565        __tmp.put_f32_le(self.xgyro);
27566        __tmp.put_f32_le(self.ygyro);
27567        __tmp.put_f32_le(self.zgyro);
27568        __tmp.put_f32_le(self.xmag);
27569        __tmp.put_f32_le(self.ymag);
27570        __tmp.put_f32_le(self.zmag);
27571        __tmp.put_f32_le(self.abs_pressure);
27572        __tmp.put_f32_le(self.diff_pressure);
27573        __tmp.put_f32_le(self.pressure_alt);
27574        __tmp.put_f32_le(self.temperature);
27575        __tmp.put_u16_le(self.fields_updated.bits());
27576        __tmp.put_u8(self.id);
27577        if matches!(version, MavlinkVersion::V2) {
27578            let len = __tmp.len();
27579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27580        } else {
27581            __tmp.len()
27582        }
27583    }
27584}
27585#[doc = "id: 122"]
27586#[doc = "Stop log transfer and resume normal logging."]
27587#[derive(Debug, Clone, PartialEq)]
27588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27590pub struct LOG_REQUEST_END_DATA {
27591    #[doc = "System ID"]
27592    pub target_system: u8,
27593    #[doc = "Component ID"]
27594    pub target_component: u8,
27595}
27596impl LOG_REQUEST_END_DATA {
27597    pub const ENCODED_LEN: usize = 2usize;
27598    pub const DEFAULT: Self = Self {
27599        target_system: 0_u8,
27600        target_component: 0_u8,
27601    };
27602    #[cfg(feature = "arbitrary")]
27603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27604        use arbitrary::{Arbitrary, Unstructured};
27605        let mut buf = [0u8; 1024];
27606        rng.fill_bytes(&mut buf);
27607        let mut unstructured = Unstructured::new(&buf);
27608        Self::arbitrary(&mut unstructured).unwrap_or_default()
27609    }
27610}
27611impl Default for LOG_REQUEST_END_DATA {
27612    fn default() -> Self {
27613        Self::DEFAULT.clone()
27614    }
27615}
27616impl MessageData for LOG_REQUEST_END_DATA {
27617    type Message = MavMessage;
27618    const ID: u32 = 122u32;
27619    const NAME: &'static str = "LOG_REQUEST_END";
27620    const EXTRA_CRC: u8 = 203u8;
27621    const ENCODED_LEN: usize = 2usize;
27622    fn deser(
27623        _version: MavlinkVersion,
27624        __input: &[u8],
27625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27626        let avail_len = __input.len();
27627        let mut payload_buf = [0; Self::ENCODED_LEN];
27628        let mut buf = if avail_len < Self::ENCODED_LEN {
27629            payload_buf[0..avail_len].copy_from_slice(__input);
27630            Bytes::new(&payload_buf)
27631        } else {
27632            Bytes::new(__input)
27633        };
27634        let mut __struct = Self::default();
27635        __struct.target_system = buf.get_u8();
27636        __struct.target_component = buf.get_u8();
27637        Ok(__struct)
27638    }
27639    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27640        let mut __tmp = BytesMut::new(bytes);
27641        #[allow(clippy::absurd_extreme_comparisons)]
27642        #[allow(unused_comparisons)]
27643        if __tmp.remaining() < Self::ENCODED_LEN {
27644            panic!(
27645                "buffer is too small (need {} bytes, but got {})",
27646                Self::ENCODED_LEN,
27647                __tmp.remaining(),
27648            )
27649        }
27650        __tmp.put_u8(self.target_system);
27651        __tmp.put_u8(self.target_component);
27652        if matches!(version, MavlinkVersion::V2) {
27653            let len = __tmp.len();
27654            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27655        } else {
27656            __tmp.len()
27657        }
27658    }
27659}
27660#[doc = "id: 225"]
27661#[doc = "EFI status output."]
27662#[derive(Debug, Clone, PartialEq)]
27663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27665pub struct EFI_STATUS_DATA {
27666    #[doc = "ECU index"]
27667    pub ecu_index: f32,
27668    #[doc = "RPM"]
27669    pub rpm: f32,
27670    #[doc = "Fuel consumed"]
27671    pub fuel_consumed: f32,
27672    #[doc = "Fuel flow rate"]
27673    pub fuel_flow: f32,
27674    #[doc = "Engine load"]
27675    pub engine_load: f32,
27676    #[doc = "Throttle position"]
27677    pub throttle_position: f32,
27678    #[doc = "Spark dwell time"]
27679    pub spark_dwell_time: f32,
27680    #[doc = "Barometric pressure"]
27681    pub barometric_pressure: f32,
27682    #[doc = "Intake manifold pressure("]
27683    pub intake_manifold_pressure: f32,
27684    #[doc = "Intake manifold temperature"]
27685    pub intake_manifold_temperature: f32,
27686    #[doc = "Cylinder head temperature"]
27687    pub cylinder_head_temperature: f32,
27688    #[doc = "Ignition timing (Crank angle degrees)"]
27689    pub ignition_timing: f32,
27690    #[doc = "Injection time"]
27691    pub injection_time: f32,
27692    #[doc = "Exhaust gas temperature"]
27693    pub exhaust_gas_temperature: f32,
27694    #[doc = "Output throttle"]
27695    pub throttle_out: f32,
27696    #[doc = "Pressure/temperature compensation"]
27697    pub pt_compensation: f32,
27698    #[doc = "EFI health status"]
27699    pub health: u8,
27700    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
27701    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27702    pub ignition_voltage: f32,
27703    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
27704    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27705    pub fuel_pressure: f32,
27706}
27707impl EFI_STATUS_DATA {
27708    pub const ENCODED_LEN: usize = 73usize;
27709    pub const DEFAULT: Self = Self {
27710        ecu_index: 0.0_f32,
27711        rpm: 0.0_f32,
27712        fuel_consumed: 0.0_f32,
27713        fuel_flow: 0.0_f32,
27714        engine_load: 0.0_f32,
27715        throttle_position: 0.0_f32,
27716        spark_dwell_time: 0.0_f32,
27717        barometric_pressure: 0.0_f32,
27718        intake_manifold_pressure: 0.0_f32,
27719        intake_manifold_temperature: 0.0_f32,
27720        cylinder_head_temperature: 0.0_f32,
27721        ignition_timing: 0.0_f32,
27722        injection_time: 0.0_f32,
27723        exhaust_gas_temperature: 0.0_f32,
27724        throttle_out: 0.0_f32,
27725        pt_compensation: 0.0_f32,
27726        health: 0_u8,
27727        ignition_voltage: 0.0_f32,
27728        fuel_pressure: 0.0_f32,
27729    };
27730    #[cfg(feature = "arbitrary")]
27731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27732        use arbitrary::{Arbitrary, Unstructured};
27733        let mut buf = [0u8; 1024];
27734        rng.fill_bytes(&mut buf);
27735        let mut unstructured = Unstructured::new(&buf);
27736        Self::arbitrary(&mut unstructured).unwrap_or_default()
27737    }
27738}
27739impl Default for EFI_STATUS_DATA {
27740    fn default() -> Self {
27741        Self::DEFAULT.clone()
27742    }
27743}
27744impl MessageData for EFI_STATUS_DATA {
27745    type Message = MavMessage;
27746    const ID: u32 = 225u32;
27747    const NAME: &'static str = "EFI_STATUS";
27748    const EXTRA_CRC: u8 = 208u8;
27749    const ENCODED_LEN: usize = 73usize;
27750    fn deser(
27751        _version: MavlinkVersion,
27752        __input: &[u8],
27753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27754        let avail_len = __input.len();
27755        let mut payload_buf = [0; Self::ENCODED_LEN];
27756        let mut buf = if avail_len < Self::ENCODED_LEN {
27757            payload_buf[0..avail_len].copy_from_slice(__input);
27758            Bytes::new(&payload_buf)
27759        } else {
27760            Bytes::new(__input)
27761        };
27762        let mut __struct = Self::default();
27763        __struct.ecu_index = buf.get_f32_le();
27764        __struct.rpm = buf.get_f32_le();
27765        __struct.fuel_consumed = buf.get_f32_le();
27766        __struct.fuel_flow = buf.get_f32_le();
27767        __struct.engine_load = buf.get_f32_le();
27768        __struct.throttle_position = buf.get_f32_le();
27769        __struct.spark_dwell_time = buf.get_f32_le();
27770        __struct.barometric_pressure = buf.get_f32_le();
27771        __struct.intake_manifold_pressure = buf.get_f32_le();
27772        __struct.intake_manifold_temperature = buf.get_f32_le();
27773        __struct.cylinder_head_temperature = buf.get_f32_le();
27774        __struct.ignition_timing = buf.get_f32_le();
27775        __struct.injection_time = buf.get_f32_le();
27776        __struct.exhaust_gas_temperature = buf.get_f32_le();
27777        __struct.throttle_out = buf.get_f32_le();
27778        __struct.pt_compensation = buf.get_f32_le();
27779        __struct.health = buf.get_u8();
27780        __struct.ignition_voltage = buf.get_f32_le();
27781        __struct.fuel_pressure = buf.get_f32_le();
27782        Ok(__struct)
27783    }
27784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27785        let mut __tmp = BytesMut::new(bytes);
27786        #[allow(clippy::absurd_extreme_comparisons)]
27787        #[allow(unused_comparisons)]
27788        if __tmp.remaining() < Self::ENCODED_LEN {
27789            panic!(
27790                "buffer is too small (need {} bytes, but got {})",
27791                Self::ENCODED_LEN,
27792                __tmp.remaining(),
27793            )
27794        }
27795        __tmp.put_f32_le(self.ecu_index);
27796        __tmp.put_f32_le(self.rpm);
27797        __tmp.put_f32_le(self.fuel_consumed);
27798        __tmp.put_f32_le(self.fuel_flow);
27799        __tmp.put_f32_le(self.engine_load);
27800        __tmp.put_f32_le(self.throttle_position);
27801        __tmp.put_f32_le(self.spark_dwell_time);
27802        __tmp.put_f32_le(self.barometric_pressure);
27803        __tmp.put_f32_le(self.intake_manifold_pressure);
27804        __tmp.put_f32_le(self.intake_manifold_temperature);
27805        __tmp.put_f32_le(self.cylinder_head_temperature);
27806        __tmp.put_f32_le(self.ignition_timing);
27807        __tmp.put_f32_le(self.injection_time);
27808        __tmp.put_f32_le(self.exhaust_gas_temperature);
27809        __tmp.put_f32_le(self.throttle_out);
27810        __tmp.put_f32_le(self.pt_compensation);
27811        __tmp.put_u8(self.health);
27812        __tmp.put_f32_le(self.ignition_voltage);
27813        __tmp.put_f32_le(self.fuel_pressure);
27814        if matches!(version, MavlinkVersion::V2) {
27815            let len = __tmp.len();
27816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27817        } else {
27818            __tmp.len()
27819        }
27820    }
27821}
27822#[doc = "id: 320"]
27823#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
27824#[derive(Debug, Clone, PartialEq)]
27825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27827pub struct PARAM_EXT_REQUEST_READ_DATA {
27828    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
27829    pub param_index: i16,
27830    #[doc = "System ID"]
27831    pub target_system: u8,
27832    #[doc = "Component ID"]
27833    pub target_component: u8,
27834    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
27835    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27836    pub param_id: [u8; 16],
27837}
27838impl PARAM_EXT_REQUEST_READ_DATA {
27839    pub const ENCODED_LEN: usize = 20usize;
27840    pub const DEFAULT: Self = Self {
27841        param_index: 0_i16,
27842        target_system: 0_u8,
27843        target_component: 0_u8,
27844        param_id: [0_u8; 16usize],
27845    };
27846    #[cfg(feature = "arbitrary")]
27847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27848        use arbitrary::{Arbitrary, Unstructured};
27849        let mut buf = [0u8; 1024];
27850        rng.fill_bytes(&mut buf);
27851        let mut unstructured = Unstructured::new(&buf);
27852        Self::arbitrary(&mut unstructured).unwrap_or_default()
27853    }
27854}
27855impl Default for PARAM_EXT_REQUEST_READ_DATA {
27856    fn default() -> Self {
27857        Self::DEFAULT.clone()
27858    }
27859}
27860impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
27861    type Message = MavMessage;
27862    const ID: u32 = 320u32;
27863    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
27864    const EXTRA_CRC: u8 = 243u8;
27865    const ENCODED_LEN: usize = 20usize;
27866    fn deser(
27867        _version: MavlinkVersion,
27868        __input: &[u8],
27869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27870        let avail_len = __input.len();
27871        let mut payload_buf = [0; Self::ENCODED_LEN];
27872        let mut buf = if avail_len < Self::ENCODED_LEN {
27873            payload_buf[0..avail_len].copy_from_slice(__input);
27874            Bytes::new(&payload_buf)
27875        } else {
27876            Bytes::new(__input)
27877        };
27878        let mut __struct = Self::default();
27879        __struct.param_index = buf.get_i16_le();
27880        __struct.target_system = buf.get_u8();
27881        __struct.target_component = buf.get_u8();
27882        for v in &mut __struct.param_id {
27883            let val = buf.get_u8();
27884            *v = val;
27885        }
27886        Ok(__struct)
27887    }
27888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27889        let mut __tmp = BytesMut::new(bytes);
27890        #[allow(clippy::absurd_extreme_comparisons)]
27891        #[allow(unused_comparisons)]
27892        if __tmp.remaining() < Self::ENCODED_LEN {
27893            panic!(
27894                "buffer is too small (need {} bytes, but got {})",
27895                Self::ENCODED_LEN,
27896                __tmp.remaining(),
27897            )
27898        }
27899        __tmp.put_i16_le(self.param_index);
27900        __tmp.put_u8(self.target_system);
27901        __tmp.put_u8(self.target_component);
27902        for val in &self.param_id {
27903            __tmp.put_u8(*val);
27904        }
27905        if matches!(version, MavlinkVersion::V2) {
27906            let len = __tmp.len();
27907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27908        } else {
27909            __tmp.len()
27910        }
27911    }
27912}
27913#[doc = "id: 241"]
27914#[doc = "Vibration levels and accelerometer clipping."]
27915#[derive(Debug, Clone, PartialEq)]
27916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27918pub struct VIBRATION_DATA {
27919    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27920    pub time_usec: u64,
27921    #[doc = "Vibration levels on X-axis"]
27922    pub vibration_x: f32,
27923    #[doc = "Vibration levels on Y-axis"]
27924    pub vibration_y: f32,
27925    #[doc = "Vibration levels on Z-axis"]
27926    pub vibration_z: f32,
27927    #[doc = "first accelerometer clipping count"]
27928    pub clipping_0: u32,
27929    #[doc = "second accelerometer clipping count"]
27930    pub clipping_1: u32,
27931    #[doc = "third accelerometer clipping count"]
27932    pub clipping_2: u32,
27933}
27934impl VIBRATION_DATA {
27935    pub const ENCODED_LEN: usize = 32usize;
27936    pub const DEFAULT: Self = Self {
27937        time_usec: 0_u64,
27938        vibration_x: 0.0_f32,
27939        vibration_y: 0.0_f32,
27940        vibration_z: 0.0_f32,
27941        clipping_0: 0_u32,
27942        clipping_1: 0_u32,
27943        clipping_2: 0_u32,
27944    };
27945    #[cfg(feature = "arbitrary")]
27946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27947        use arbitrary::{Arbitrary, Unstructured};
27948        let mut buf = [0u8; 1024];
27949        rng.fill_bytes(&mut buf);
27950        let mut unstructured = Unstructured::new(&buf);
27951        Self::arbitrary(&mut unstructured).unwrap_or_default()
27952    }
27953}
27954impl Default for VIBRATION_DATA {
27955    fn default() -> Self {
27956        Self::DEFAULT.clone()
27957    }
27958}
27959impl MessageData for VIBRATION_DATA {
27960    type Message = MavMessage;
27961    const ID: u32 = 241u32;
27962    const NAME: &'static str = "VIBRATION";
27963    const EXTRA_CRC: u8 = 90u8;
27964    const ENCODED_LEN: usize = 32usize;
27965    fn deser(
27966        _version: MavlinkVersion,
27967        __input: &[u8],
27968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27969        let avail_len = __input.len();
27970        let mut payload_buf = [0; Self::ENCODED_LEN];
27971        let mut buf = if avail_len < Self::ENCODED_LEN {
27972            payload_buf[0..avail_len].copy_from_slice(__input);
27973            Bytes::new(&payload_buf)
27974        } else {
27975            Bytes::new(__input)
27976        };
27977        let mut __struct = Self::default();
27978        __struct.time_usec = buf.get_u64_le();
27979        __struct.vibration_x = buf.get_f32_le();
27980        __struct.vibration_y = buf.get_f32_le();
27981        __struct.vibration_z = buf.get_f32_le();
27982        __struct.clipping_0 = buf.get_u32_le();
27983        __struct.clipping_1 = buf.get_u32_le();
27984        __struct.clipping_2 = buf.get_u32_le();
27985        Ok(__struct)
27986    }
27987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27988        let mut __tmp = BytesMut::new(bytes);
27989        #[allow(clippy::absurd_extreme_comparisons)]
27990        #[allow(unused_comparisons)]
27991        if __tmp.remaining() < Self::ENCODED_LEN {
27992            panic!(
27993                "buffer is too small (need {} bytes, but got {})",
27994                Self::ENCODED_LEN,
27995                __tmp.remaining(),
27996            )
27997        }
27998        __tmp.put_u64_le(self.time_usec);
27999        __tmp.put_f32_le(self.vibration_x);
28000        __tmp.put_f32_le(self.vibration_y);
28001        __tmp.put_f32_le(self.vibration_z);
28002        __tmp.put_u32_le(self.clipping_0);
28003        __tmp.put_u32_le(self.clipping_1);
28004        __tmp.put_u32_le(self.clipping_2);
28005        if matches!(version, MavlinkVersion::V2) {
28006            let len = __tmp.len();
28007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28008        } else {
28009            __tmp.len()
28010        }
28011    }
28012}
28013#[doc = "id: 146"]
28014#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
28015#[derive(Debug, Clone, PartialEq)]
28016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28018pub struct CONTROL_SYSTEM_STATE_DATA {
28019    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28020    pub time_usec: u64,
28021    #[doc = "X acceleration in body frame"]
28022    pub x_acc: f32,
28023    #[doc = "Y acceleration in body frame"]
28024    pub y_acc: f32,
28025    #[doc = "Z acceleration in body frame"]
28026    pub z_acc: f32,
28027    #[doc = "X velocity in body frame"]
28028    pub x_vel: f32,
28029    #[doc = "Y velocity in body frame"]
28030    pub y_vel: f32,
28031    #[doc = "Z velocity in body frame"]
28032    pub z_vel: f32,
28033    #[doc = "X position in local frame"]
28034    pub x_pos: f32,
28035    #[doc = "Y position in local frame"]
28036    pub y_pos: f32,
28037    #[doc = "Z position in local frame"]
28038    pub z_pos: f32,
28039    #[doc = "Airspeed, set to -1 if unknown"]
28040    pub airspeed: f32,
28041    #[doc = "Variance of body velocity estimate"]
28042    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28043    pub vel_variance: [f32; 3],
28044    #[doc = "Variance in local position"]
28045    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28046    pub pos_variance: [f32; 3],
28047    #[doc = "The attitude, represented as Quaternion"]
28048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28049    pub q: [f32; 4],
28050    #[doc = "Angular rate in roll axis"]
28051    pub roll_rate: f32,
28052    #[doc = "Angular rate in pitch axis"]
28053    pub pitch_rate: f32,
28054    #[doc = "Angular rate in yaw axis"]
28055    pub yaw_rate: f32,
28056}
28057impl CONTROL_SYSTEM_STATE_DATA {
28058    pub const ENCODED_LEN: usize = 100usize;
28059    pub const DEFAULT: Self = Self {
28060        time_usec: 0_u64,
28061        x_acc: 0.0_f32,
28062        y_acc: 0.0_f32,
28063        z_acc: 0.0_f32,
28064        x_vel: 0.0_f32,
28065        y_vel: 0.0_f32,
28066        z_vel: 0.0_f32,
28067        x_pos: 0.0_f32,
28068        y_pos: 0.0_f32,
28069        z_pos: 0.0_f32,
28070        airspeed: 0.0_f32,
28071        vel_variance: [0.0_f32; 3usize],
28072        pos_variance: [0.0_f32; 3usize],
28073        q: [0.0_f32; 4usize],
28074        roll_rate: 0.0_f32,
28075        pitch_rate: 0.0_f32,
28076        yaw_rate: 0.0_f32,
28077    };
28078    #[cfg(feature = "arbitrary")]
28079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28080        use arbitrary::{Arbitrary, Unstructured};
28081        let mut buf = [0u8; 1024];
28082        rng.fill_bytes(&mut buf);
28083        let mut unstructured = Unstructured::new(&buf);
28084        Self::arbitrary(&mut unstructured).unwrap_or_default()
28085    }
28086}
28087impl Default for CONTROL_SYSTEM_STATE_DATA {
28088    fn default() -> Self {
28089        Self::DEFAULT.clone()
28090    }
28091}
28092impl MessageData for CONTROL_SYSTEM_STATE_DATA {
28093    type Message = MavMessage;
28094    const ID: u32 = 146u32;
28095    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
28096    const EXTRA_CRC: u8 = 103u8;
28097    const ENCODED_LEN: usize = 100usize;
28098    fn deser(
28099        _version: MavlinkVersion,
28100        __input: &[u8],
28101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28102        let avail_len = __input.len();
28103        let mut payload_buf = [0; Self::ENCODED_LEN];
28104        let mut buf = if avail_len < Self::ENCODED_LEN {
28105            payload_buf[0..avail_len].copy_from_slice(__input);
28106            Bytes::new(&payload_buf)
28107        } else {
28108            Bytes::new(__input)
28109        };
28110        let mut __struct = Self::default();
28111        __struct.time_usec = buf.get_u64_le();
28112        __struct.x_acc = buf.get_f32_le();
28113        __struct.y_acc = buf.get_f32_le();
28114        __struct.z_acc = buf.get_f32_le();
28115        __struct.x_vel = buf.get_f32_le();
28116        __struct.y_vel = buf.get_f32_le();
28117        __struct.z_vel = buf.get_f32_le();
28118        __struct.x_pos = buf.get_f32_le();
28119        __struct.y_pos = buf.get_f32_le();
28120        __struct.z_pos = buf.get_f32_le();
28121        __struct.airspeed = buf.get_f32_le();
28122        for v in &mut __struct.vel_variance {
28123            let val = buf.get_f32_le();
28124            *v = val;
28125        }
28126        for v in &mut __struct.pos_variance {
28127            let val = buf.get_f32_le();
28128            *v = val;
28129        }
28130        for v in &mut __struct.q {
28131            let val = buf.get_f32_le();
28132            *v = val;
28133        }
28134        __struct.roll_rate = buf.get_f32_le();
28135        __struct.pitch_rate = buf.get_f32_le();
28136        __struct.yaw_rate = buf.get_f32_le();
28137        Ok(__struct)
28138    }
28139    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28140        let mut __tmp = BytesMut::new(bytes);
28141        #[allow(clippy::absurd_extreme_comparisons)]
28142        #[allow(unused_comparisons)]
28143        if __tmp.remaining() < Self::ENCODED_LEN {
28144            panic!(
28145                "buffer is too small (need {} bytes, but got {})",
28146                Self::ENCODED_LEN,
28147                __tmp.remaining(),
28148            )
28149        }
28150        __tmp.put_u64_le(self.time_usec);
28151        __tmp.put_f32_le(self.x_acc);
28152        __tmp.put_f32_le(self.y_acc);
28153        __tmp.put_f32_le(self.z_acc);
28154        __tmp.put_f32_le(self.x_vel);
28155        __tmp.put_f32_le(self.y_vel);
28156        __tmp.put_f32_le(self.z_vel);
28157        __tmp.put_f32_le(self.x_pos);
28158        __tmp.put_f32_le(self.y_pos);
28159        __tmp.put_f32_le(self.z_pos);
28160        __tmp.put_f32_le(self.airspeed);
28161        for val in &self.vel_variance {
28162            __tmp.put_f32_le(*val);
28163        }
28164        for val in &self.pos_variance {
28165            __tmp.put_f32_le(*val);
28166        }
28167        for val in &self.q {
28168            __tmp.put_f32_le(*val);
28169        }
28170        __tmp.put_f32_le(self.roll_rate);
28171        __tmp.put_f32_le(self.pitch_rate);
28172        __tmp.put_f32_le(self.yaw_rate);
28173        if matches!(version, MavlinkVersion::V2) {
28174            let len = __tmp.len();
28175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28176        } else {
28177            __tmp.len()
28178        }
28179    }
28180}
28181#[doc = "id: 380"]
28182#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
28183#[derive(Debug, Clone, PartialEq)]
28184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28186pub struct TIME_ESTIMATE_TO_TARGET_DATA {
28187    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
28188    pub safe_return: i32,
28189    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
28190    pub land: i32,
28191    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
28192    pub mission_next_item: i32,
28193    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
28194    pub mission_end: i32,
28195    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
28196    pub commanded_action: i32,
28197}
28198impl TIME_ESTIMATE_TO_TARGET_DATA {
28199    pub const ENCODED_LEN: usize = 20usize;
28200    pub const DEFAULT: Self = Self {
28201        safe_return: 0_i32,
28202        land: 0_i32,
28203        mission_next_item: 0_i32,
28204        mission_end: 0_i32,
28205        commanded_action: 0_i32,
28206    };
28207    #[cfg(feature = "arbitrary")]
28208    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28209        use arbitrary::{Arbitrary, Unstructured};
28210        let mut buf = [0u8; 1024];
28211        rng.fill_bytes(&mut buf);
28212        let mut unstructured = Unstructured::new(&buf);
28213        Self::arbitrary(&mut unstructured).unwrap_or_default()
28214    }
28215}
28216impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
28217    fn default() -> Self {
28218        Self::DEFAULT.clone()
28219    }
28220}
28221impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
28222    type Message = MavMessage;
28223    const ID: u32 = 380u32;
28224    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
28225    const EXTRA_CRC: u8 = 232u8;
28226    const ENCODED_LEN: usize = 20usize;
28227    fn deser(
28228        _version: MavlinkVersion,
28229        __input: &[u8],
28230    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28231        let avail_len = __input.len();
28232        let mut payload_buf = [0; Self::ENCODED_LEN];
28233        let mut buf = if avail_len < Self::ENCODED_LEN {
28234            payload_buf[0..avail_len].copy_from_slice(__input);
28235            Bytes::new(&payload_buf)
28236        } else {
28237            Bytes::new(__input)
28238        };
28239        let mut __struct = Self::default();
28240        __struct.safe_return = buf.get_i32_le();
28241        __struct.land = buf.get_i32_le();
28242        __struct.mission_next_item = buf.get_i32_le();
28243        __struct.mission_end = buf.get_i32_le();
28244        __struct.commanded_action = buf.get_i32_le();
28245        Ok(__struct)
28246    }
28247    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28248        let mut __tmp = BytesMut::new(bytes);
28249        #[allow(clippy::absurd_extreme_comparisons)]
28250        #[allow(unused_comparisons)]
28251        if __tmp.remaining() < Self::ENCODED_LEN {
28252            panic!(
28253                "buffer is too small (need {} bytes, but got {})",
28254                Self::ENCODED_LEN,
28255                __tmp.remaining(),
28256            )
28257        }
28258        __tmp.put_i32_le(self.safe_return);
28259        __tmp.put_i32_le(self.land);
28260        __tmp.put_i32_le(self.mission_next_item);
28261        __tmp.put_i32_le(self.mission_end);
28262        __tmp.put_i32_le(self.commanded_action);
28263        if matches!(version, MavlinkVersion::V2) {
28264            let len = __tmp.len();
28265            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28266        } else {
28267            __tmp.len()
28268        }
28269    }
28270}
28271#[doc = "id: 300"]
28272#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
28273#[derive(Debug, Clone, PartialEq)]
28274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28276pub struct PROTOCOL_VERSION_DATA {
28277    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
28278    pub version: u16,
28279    #[doc = "Minimum MAVLink version supported"]
28280    pub min_version: u16,
28281    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
28282    pub max_version: u16,
28283    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
28284    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28285    pub spec_version_hash: [u8; 8],
28286    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
28287    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28288    pub library_version_hash: [u8; 8],
28289}
28290impl PROTOCOL_VERSION_DATA {
28291    pub const ENCODED_LEN: usize = 22usize;
28292    pub const DEFAULT: Self = Self {
28293        version: 0_u16,
28294        min_version: 0_u16,
28295        max_version: 0_u16,
28296        spec_version_hash: [0_u8; 8usize],
28297        library_version_hash: [0_u8; 8usize],
28298    };
28299    #[cfg(feature = "arbitrary")]
28300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28301        use arbitrary::{Arbitrary, Unstructured};
28302        let mut buf = [0u8; 1024];
28303        rng.fill_bytes(&mut buf);
28304        let mut unstructured = Unstructured::new(&buf);
28305        Self::arbitrary(&mut unstructured).unwrap_or_default()
28306    }
28307}
28308impl Default for PROTOCOL_VERSION_DATA {
28309    fn default() -> Self {
28310        Self::DEFAULT.clone()
28311    }
28312}
28313impl MessageData for PROTOCOL_VERSION_DATA {
28314    type Message = MavMessage;
28315    const ID: u32 = 300u32;
28316    const NAME: &'static str = "PROTOCOL_VERSION";
28317    const EXTRA_CRC: u8 = 217u8;
28318    const ENCODED_LEN: usize = 22usize;
28319    fn deser(
28320        _version: MavlinkVersion,
28321        __input: &[u8],
28322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28323        let avail_len = __input.len();
28324        let mut payload_buf = [0; Self::ENCODED_LEN];
28325        let mut buf = if avail_len < Self::ENCODED_LEN {
28326            payload_buf[0..avail_len].copy_from_slice(__input);
28327            Bytes::new(&payload_buf)
28328        } else {
28329            Bytes::new(__input)
28330        };
28331        let mut __struct = Self::default();
28332        __struct.version = buf.get_u16_le();
28333        __struct.min_version = buf.get_u16_le();
28334        __struct.max_version = buf.get_u16_le();
28335        for v in &mut __struct.spec_version_hash {
28336            let val = buf.get_u8();
28337            *v = val;
28338        }
28339        for v in &mut __struct.library_version_hash {
28340            let val = buf.get_u8();
28341            *v = val;
28342        }
28343        Ok(__struct)
28344    }
28345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28346        let mut __tmp = BytesMut::new(bytes);
28347        #[allow(clippy::absurd_extreme_comparisons)]
28348        #[allow(unused_comparisons)]
28349        if __tmp.remaining() < Self::ENCODED_LEN {
28350            panic!(
28351                "buffer is too small (need {} bytes, but got {})",
28352                Self::ENCODED_LEN,
28353                __tmp.remaining(),
28354            )
28355        }
28356        __tmp.put_u16_le(self.version);
28357        __tmp.put_u16_le(self.min_version);
28358        __tmp.put_u16_le(self.max_version);
28359        for val in &self.spec_version_hash {
28360            __tmp.put_u8(*val);
28361        }
28362        for val in &self.library_version_hash {
28363            __tmp.put_u8(*val);
28364        }
28365        if matches!(version, MavlinkVersion::V2) {
28366            let len = __tmp.len();
28367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28368        } else {
28369            __tmp.len()
28370        }
28371    }
28372}
28373#[doc = "id: 1"]
28374#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
28375#[derive(Debug, Clone, PartialEq)]
28376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28378pub struct SYS_STATUS_DATA {
28379    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28380    pub onboard_control_sensors_present: MavSysStatusSensor,
28381    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28382    pub onboard_control_sensors_enabled: MavSysStatusSensor,
28383    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28384    pub onboard_control_sensors_health: MavSysStatusSensor,
28385    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
28386    pub load: u16,
28387    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
28388    pub voltage_battery: u16,
28389    #[doc = "Battery current, -1: Current not sent by autopilot"]
28390    pub current_battery: i16,
28391    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28392    pub drop_rate_comm: u16,
28393    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28394    pub errors_comm: u16,
28395    #[doc = "Autopilot-specific errors"]
28396    pub errors_count1: u16,
28397    #[doc = "Autopilot-specific errors"]
28398    pub errors_count2: u16,
28399    #[doc = "Autopilot-specific errors"]
28400    pub errors_count3: u16,
28401    #[doc = "Autopilot-specific errors"]
28402    pub errors_count4: u16,
28403    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
28404    pub battery_remaining: i8,
28405    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28406    #[cfg_attr(feature = "serde", serde(default))]
28407    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
28408    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28409    #[cfg_attr(feature = "serde", serde(default))]
28410    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
28411    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28412    #[cfg_attr(feature = "serde", serde(default))]
28413    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
28414}
28415impl SYS_STATUS_DATA {
28416    pub const ENCODED_LEN: usize = 43usize;
28417    pub const DEFAULT: Self = Self {
28418        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
28419        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
28420        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
28421        load: 0_u16,
28422        voltage_battery: 0_u16,
28423        current_battery: 0_i16,
28424        drop_rate_comm: 0_u16,
28425        errors_comm: 0_u16,
28426        errors_count1: 0_u16,
28427        errors_count2: 0_u16,
28428        errors_count3: 0_u16,
28429        errors_count4: 0_u16,
28430        battery_remaining: 0_i8,
28431        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
28432        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
28433        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
28434    };
28435    #[cfg(feature = "arbitrary")]
28436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28437        use arbitrary::{Arbitrary, Unstructured};
28438        let mut buf = [0u8; 1024];
28439        rng.fill_bytes(&mut buf);
28440        let mut unstructured = Unstructured::new(&buf);
28441        Self::arbitrary(&mut unstructured).unwrap_or_default()
28442    }
28443}
28444impl Default for SYS_STATUS_DATA {
28445    fn default() -> Self {
28446        Self::DEFAULT.clone()
28447    }
28448}
28449impl MessageData for SYS_STATUS_DATA {
28450    type Message = MavMessage;
28451    const ID: u32 = 1u32;
28452    const NAME: &'static str = "SYS_STATUS";
28453    const EXTRA_CRC: u8 = 124u8;
28454    const ENCODED_LEN: usize = 43usize;
28455    fn deser(
28456        _version: MavlinkVersion,
28457        __input: &[u8],
28458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28459        let avail_len = __input.len();
28460        let mut payload_buf = [0; Self::ENCODED_LEN];
28461        let mut buf = if avail_len < Self::ENCODED_LEN {
28462            payload_buf[0..avail_len].copy_from_slice(__input);
28463            Bytes::new(&payload_buf)
28464        } else {
28465            Bytes::new(__input)
28466        };
28467        let mut __struct = Self::default();
28468        let tmp = buf.get_u32_le();
28469        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
28470            tmp & MavSysStatusSensor::all().bits(),
28471        )
28472        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28473            flag_type: "MavSysStatusSensor",
28474            value: tmp as u32,
28475        })?;
28476        let tmp = buf.get_u32_le();
28477        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
28478            tmp & MavSysStatusSensor::all().bits(),
28479        )
28480        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28481            flag_type: "MavSysStatusSensor",
28482            value: tmp as u32,
28483        })?;
28484        let tmp = buf.get_u32_le();
28485        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
28486            tmp & MavSysStatusSensor::all().bits(),
28487        )
28488        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28489            flag_type: "MavSysStatusSensor",
28490            value: tmp as u32,
28491        })?;
28492        __struct.load = buf.get_u16_le();
28493        __struct.voltage_battery = buf.get_u16_le();
28494        __struct.current_battery = buf.get_i16_le();
28495        __struct.drop_rate_comm = buf.get_u16_le();
28496        __struct.errors_comm = buf.get_u16_le();
28497        __struct.errors_count1 = buf.get_u16_le();
28498        __struct.errors_count2 = buf.get_u16_le();
28499        __struct.errors_count3 = buf.get_u16_le();
28500        __struct.errors_count4 = buf.get_u16_le();
28501        __struct.battery_remaining = buf.get_i8();
28502        let tmp = buf.get_u32_le();
28503        __struct.onboard_control_sensors_present_extended =
28504            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28505                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28506                flag_type: "MavSysStatusSensorExtended",
28507                value: tmp as u32,
28508            })?;
28509        let tmp = buf.get_u32_le();
28510        __struct.onboard_control_sensors_enabled_extended =
28511            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28512                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28513                flag_type: "MavSysStatusSensorExtended",
28514                value: tmp as u32,
28515            })?;
28516        let tmp = buf.get_u32_le();
28517        __struct.onboard_control_sensors_health_extended =
28518            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28519                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28520                flag_type: "MavSysStatusSensorExtended",
28521                value: tmp as u32,
28522            })?;
28523        Ok(__struct)
28524    }
28525    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28526        let mut __tmp = BytesMut::new(bytes);
28527        #[allow(clippy::absurd_extreme_comparisons)]
28528        #[allow(unused_comparisons)]
28529        if __tmp.remaining() < Self::ENCODED_LEN {
28530            panic!(
28531                "buffer is too small (need {} bytes, but got {})",
28532                Self::ENCODED_LEN,
28533                __tmp.remaining(),
28534            )
28535        }
28536        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
28537        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
28538        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
28539        __tmp.put_u16_le(self.load);
28540        __tmp.put_u16_le(self.voltage_battery);
28541        __tmp.put_i16_le(self.current_battery);
28542        __tmp.put_u16_le(self.drop_rate_comm);
28543        __tmp.put_u16_le(self.errors_comm);
28544        __tmp.put_u16_le(self.errors_count1);
28545        __tmp.put_u16_le(self.errors_count2);
28546        __tmp.put_u16_le(self.errors_count3);
28547        __tmp.put_u16_le(self.errors_count4);
28548        __tmp.put_i8(self.battery_remaining);
28549        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
28550        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
28551        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
28552        if matches!(version, MavlinkVersion::V2) {
28553            let len = __tmp.len();
28554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28555        } else {
28556            __tmp.len()
28557        }
28558    }
28559}
28560#[doc = "id: 257"]
28561#[doc = "Report button state change."]
28562#[derive(Debug, Clone, PartialEq)]
28563#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28565pub struct BUTTON_CHANGE_DATA {
28566    #[doc = "Timestamp (time since system boot)."]
28567    pub time_boot_ms: u32,
28568    #[doc = "Time of last change of button state."]
28569    pub last_change_ms: u32,
28570    #[doc = "Bitmap for state of buttons."]
28571    pub state: u8,
28572}
28573impl BUTTON_CHANGE_DATA {
28574    pub const ENCODED_LEN: usize = 9usize;
28575    pub const DEFAULT: Self = Self {
28576        time_boot_ms: 0_u32,
28577        last_change_ms: 0_u32,
28578        state: 0_u8,
28579    };
28580    #[cfg(feature = "arbitrary")]
28581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28582        use arbitrary::{Arbitrary, Unstructured};
28583        let mut buf = [0u8; 1024];
28584        rng.fill_bytes(&mut buf);
28585        let mut unstructured = Unstructured::new(&buf);
28586        Self::arbitrary(&mut unstructured).unwrap_or_default()
28587    }
28588}
28589impl Default for BUTTON_CHANGE_DATA {
28590    fn default() -> Self {
28591        Self::DEFAULT.clone()
28592    }
28593}
28594impl MessageData for BUTTON_CHANGE_DATA {
28595    type Message = MavMessage;
28596    const ID: u32 = 257u32;
28597    const NAME: &'static str = "BUTTON_CHANGE";
28598    const EXTRA_CRC: u8 = 131u8;
28599    const ENCODED_LEN: usize = 9usize;
28600    fn deser(
28601        _version: MavlinkVersion,
28602        __input: &[u8],
28603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28604        let avail_len = __input.len();
28605        let mut payload_buf = [0; Self::ENCODED_LEN];
28606        let mut buf = if avail_len < Self::ENCODED_LEN {
28607            payload_buf[0..avail_len].copy_from_slice(__input);
28608            Bytes::new(&payload_buf)
28609        } else {
28610            Bytes::new(__input)
28611        };
28612        let mut __struct = Self::default();
28613        __struct.time_boot_ms = buf.get_u32_le();
28614        __struct.last_change_ms = buf.get_u32_le();
28615        __struct.state = buf.get_u8();
28616        Ok(__struct)
28617    }
28618    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28619        let mut __tmp = BytesMut::new(bytes);
28620        #[allow(clippy::absurd_extreme_comparisons)]
28621        #[allow(unused_comparisons)]
28622        if __tmp.remaining() < Self::ENCODED_LEN {
28623            panic!(
28624                "buffer is too small (need {} bytes, but got {})",
28625                Self::ENCODED_LEN,
28626                __tmp.remaining(),
28627            )
28628        }
28629        __tmp.put_u32_le(self.time_boot_ms);
28630        __tmp.put_u32_le(self.last_change_ms);
28631        __tmp.put_u8(self.state);
28632        if matches!(version, MavlinkVersion::V2) {
28633            let len = __tmp.len();
28634            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28635        } else {
28636            __tmp.len()
28637        }
28638    }
28639}
28640#[doc = "id: 371"]
28641#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
28642#[derive(Debug, Clone, PartialEq)]
28643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28645pub struct FUEL_STATUS_DATA {
28646    #[doc = "Capacity when full. Must be provided."]
28647    pub maximum_fuel: f32,
28648    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
28649    pub consumed_fuel: f32,
28650    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
28651    pub remaining_fuel: f32,
28652    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
28653    pub flow_rate: f32,
28654    #[doc = "Fuel temperature. NaN: field not provided."]
28655    pub temperature: f32,
28656    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
28657    pub fuel_type: MavFuelType,
28658    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
28659    pub id: u8,
28660    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
28661    pub percent_remaining: u8,
28662}
28663impl FUEL_STATUS_DATA {
28664    pub const ENCODED_LEN: usize = 26usize;
28665    pub const DEFAULT: Self = Self {
28666        maximum_fuel: 0.0_f32,
28667        consumed_fuel: 0.0_f32,
28668        remaining_fuel: 0.0_f32,
28669        flow_rate: 0.0_f32,
28670        temperature: 0.0_f32,
28671        fuel_type: MavFuelType::DEFAULT,
28672        id: 0_u8,
28673        percent_remaining: 0_u8,
28674    };
28675    #[cfg(feature = "arbitrary")]
28676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28677        use arbitrary::{Arbitrary, Unstructured};
28678        let mut buf = [0u8; 1024];
28679        rng.fill_bytes(&mut buf);
28680        let mut unstructured = Unstructured::new(&buf);
28681        Self::arbitrary(&mut unstructured).unwrap_or_default()
28682    }
28683}
28684impl Default for FUEL_STATUS_DATA {
28685    fn default() -> Self {
28686        Self::DEFAULT.clone()
28687    }
28688}
28689impl MessageData for FUEL_STATUS_DATA {
28690    type Message = MavMessage;
28691    const ID: u32 = 371u32;
28692    const NAME: &'static str = "FUEL_STATUS";
28693    const EXTRA_CRC: u8 = 10u8;
28694    const ENCODED_LEN: usize = 26usize;
28695    fn deser(
28696        _version: MavlinkVersion,
28697        __input: &[u8],
28698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28699        let avail_len = __input.len();
28700        let mut payload_buf = [0; Self::ENCODED_LEN];
28701        let mut buf = if avail_len < Self::ENCODED_LEN {
28702            payload_buf[0..avail_len].copy_from_slice(__input);
28703            Bytes::new(&payload_buf)
28704        } else {
28705            Bytes::new(__input)
28706        };
28707        let mut __struct = Self::default();
28708        __struct.maximum_fuel = buf.get_f32_le();
28709        __struct.consumed_fuel = buf.get_f32_le();
28710        __struct.remaining_fuel = buf.get_f32_le();
28711        __struct.flow_rate = buf.get_f32_le();
28712        __struct.temperature = buf.get_f32_le();
28713        let tmp = buf.get_u32_le();
28714        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
28715            ::mavlink_core::error::ParserError::InvalidEnum {
28716                enum_type: "MavFuelType",
28717                value: tmp as u32,
28718            },
28719        )?;
28720        __struct.id = buf.get_u8();
28721        __struct.percent_remaining = buf.get_u8();
28722        Ok(__struct)
28723    }
28724    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28725        let mut __tmp = BytesMut::new(bytes);
28726        #[allow(clippy::absurd_extreme_comparisons)]
28727        #[allow(unused_comparisons)]
28728        if __tmp.remaining() < Self::ENCODED_LEN {
28729            panic!(
28730                "buffer is too small (need {} bytes, but got {})",
28731                Self::ENCODED_LEN,
28732                __tmp.remaining(),
28733            )
28734        }
28735        __tmp.put_f32_le(self.maximum_fuel);
28736        __tmp.put_f32_le(self.consumed_fuel);
28737        __tmp.put_f32_le(self.remaining_fuel);
28738        __tmp.put_f32_le(self.flow_rate);
28739        __tmp.put_f32_le(self.temperature);
28740        __tmp.put_u32_le(self.fuel_type as u32);
28741        __tmp.put_u8(self.id);
28742        __tmp.put_u8(self.percent_remaining);
28743        if matches!(version, MavlinkVersion::V2) {
28744            let len = __tmp.len();
28745            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28746        } else {
28747            __tmp.len()
28748        }
28749    }
28750}
28751#[doc = "id: 47"]
28752#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
28753#[derive(Debug, Clone, PartialEq)]
28754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28756pub struct MISSION_ACK_DATA {
28757    #[doc = "System ID"]
28758    pub target_system: u8,
28759    #[doc = "Component ID"]
28760    pub target_component: u8,
28761    #[doc = "Mission result."]
28762    pub mavtype: MavMissionResult,
28763    #[doc = "Mission type."]
28764    #[cfg_attr(feature = "serde", serde(default))]
28765    pub mission_type: MavMissionType,
28766    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
28767    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28768    pub opaque_id: u32,
28769}
28770impl MISSION_ACK_DATA {
28771    pub const ENCODED_LEN: usize = 8usize;
28772    pub const DEFAULT: Self = Self {
28773        target_system: 0_u8,
28774        target_component: 0_u8,
28775        mavtype: MavMissionResult::DEFAULT,
28776        mission_type: MavMissionType::DEFAULT,
28777        opaque_id: 0_u32,
28778    };
28779    #[cfg(feature = "arbitrary")]
28780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28781        use arbitrary::{Arbitrary, Unstructured};
28782        let mut buf = [0u8; 1024];
28783        rng.fill_bytes(&mut buf);
28784        let mut unstructured = Unstructured::new(&buf);
28785        Self::arbitrary(&mut unstructured).unwrap_or_default()
28786    }
28787}
28788impl Default for MISSION_ACK_DATA {
28789    fn default() -> Self {
28790        Self::DEFAULT.clone()
28791    }
28792}
28793impl MessageData for MISSION_ACK_DATA {
28794    type Message = MavMessage;
28795    const ID: u32 = 47u32;
28796    const NAME: &'static str = "MISSION_ACK";
28797    const EXTRA_CRC: u8 = 153u8;
28798    const ENCODED_LEN: usize = 8usize;
28799    fn deser(
28800        _version: MavlinkVersion,
28801        __input: &[u8],
28802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28803        let avail_len = __input.len();
28804        let mut payload_buf = [0; Self::ENCODED_LEN];
28805        let mut buf = if avail_len < Self::ENCODED_LEN {
28806            payload_buf[0..avail_len].copy_from_slice(__input);
28807            Bytes::new(&payload_buf)
28808        } else {
28809            Bytes::new(__input)
28810        };
28811        let mut __struct = Self::default();
28812        __struct.target_system = buf.get_u8();
28813        __struct.target_component = buf.get_u8();
28814        let tmp = buf.get_u8();
28815        __struct.mavtype =
28816            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28817                enum_type: "MavMissionResult",
28818                value: tmp as u32,
28819            })?;
28820        let tmp = buf.get_u8();
28821        __struct.mission_type =
28822            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28823                enum_type: "MavMissionType",
28824                value: tmp as u32,
28825            })?;
28826        __struct.opaque_id = buf.get_u32_le();
28827        Ok(__struct)
28828    }
28829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28830        let mut __tmp = BytesMut::new(bytes);
28831        #[allow(clippy::absurd_extreme_comparisons)]
28832        #[allow(unused_comparisons)]
28833        if __tmp.remaining() < Self::ENCODED_LEN {
28834            panic!(
28835                "buffer is too small (need {} bytes, but got {})",
28836                Self::ENCODED_LEN,
28837                __tmp.remaining(),
28838            )
28839        }
28840        __tmp.put_u8(self.target_system);
28841        __tmp.put_u8(self.target_component);
28842        __tmp.put_u8(self.mavtype as u8);
28843        __tmp.put_u8(self.mission_type as u8);
28844        __tmp.put_u32_le(self.opaque_id);
28845        if matches!(version, MavlinkVersion::V2) {
28846            let len = __tmp.len();
28847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28848        } else {
28849            __tmp.len()
28850        }
28851    }
28852}
28853#[doc = "id: 142"]
28854#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
28855#[derive(Debug, Clone, PartialEq)]
28856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28858pub struct RESOURCE_REQUEST_DATA {
28859    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
28860    pub request_id: u8,
28861    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
28862    pub uri_type: u8,
28863    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
28864    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28865    pub uri: [u8; 120],
28866    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
28867    pub transfer_type: u8,
28868    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
28869    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28870    pub storage: [u8; 120],
28871}
28872impl RESOURCE_REQUEST_DATA {
28873    pub const ENCODED_LEN: usize = 243usize;
28874    pub const DEFAULT: Self = Self {
28875        request_id: 0_u8,
28876        uri_type: 0_u8,
28877        uri: [0_u8; 120usize],
28878        transfer_type: 0_u8,
28879        storage: [0_u8; 120usize],
28880    };
28881    #[cfg(feature = "arbitrary")]
28882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28883        use arbitrary::{Arbitrary, Unstructured};
28884        let mut buf = [0u8; 1024];
28885        rng.fill_bytes(&mut buf);
28886        let mut unstructured = Unstructured::new(&buf);
28887        Self::arbitrary(&mut unstructured).unwrap_or_default()
28888    }
28889}
28890impl Default for RESOURCE_REQUEST_DATA {
28891    fn default() -> Self {
28892        Self::DEFAULT.clone()
28893    }
28894}
28895impl MessageData for RESOURCE_REQUEST_DATA {
28896    type Message = MavMessage;
28897    const ID: u32 = 142u32;
28898    const NAME: &'static str = "RESOURCE_REQUEST";
28899    const EXTRA_CRC: u8 = 72u8;
28900    const ENCODED_LEN: usize = 243usize;
28901    fn deser(
28902        _version: MavlinkVersion,
28903        __input: &[u8],
28904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28905        let avail_len = __input.len();
28906        let mut payload_buf = [0; Self::ENCODED_LEN];
28907        let mut buf = if avail_len < Self::ENCODED_LEN {
28908            payload_buf[0..avail_len].copy_from_slice(__input);
28909            Bytes::new(&payload_buf)
28910        } else {
28911            Bytes::new(__input)
28912        };
28913        let mut __struct = Self::default();
28914        __struct.request_id = buf.get_u8();
28915        __struct.uri_type = buf.get_u8();
28916        for v in &mut __struct.uri {
28917            let val = buf.get_u8();
28918            *v = val;
28919        }
28920        __struct.transfer_type = buf.get_u8();
28921        for v in &mut __struct.storage {
28922            let val = buf.get_u8();
28923            *v = val;
28924        }
28925        Ok(__struct)
28926    }
28927    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28928        let mut __tmp = BytesMut::new(bytes);
28929        #[allow(clippy::absurd_extreme_comparisons)]
28930        #[allow(unused_comparisons)]
28931        if __tmp.remaining() < Self::ENCODED_LEN {
28932            panic!(
28933                "buffer is too small (need {} bytes, but got {})",
28934                Self::ENCODED_LEN,
28935                __tmp.remaining(),
28936            )
28937        }
28938        __tmp.put_u8(self.request_id);
28939        __tmp.put_u8(self.uri_type);
28940        for val in &self.uri {
28941            __tmp.put_u8(*val);
28942        }
28943        __tmp.put_u8(self.transfer_type);
28944        for val in &self.storage {
28945            __tmp.put_u8(*val);
28946        }
28947        if matches!(version, MavlinkVersion::V2) {
28948            let len = __tmp.len();
28949            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28950        } else {
28951            __tmp.len()
28952        }
28953    }
28954}
28955#[doc = "id: 277"]
28956#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
28957#[derive(Debug, Clone, PartialEq)]
28958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28959#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28960pub struct CAMERA_THERMAL_RANGE_DATA {
28961    #[doc = "Timestamp (time since system boot)."]
28962    pub time_boot_ms: u32,
28963    #[doc = "Temperature max."]
28964    pub max: f32,
28965    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
28966    pub max_point_x: f32,
28967    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
28968    pub max_point_y: f32,
28969    #[doc = "Temperature min."]
28970    pub min: f32,
28971    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
28972    pub min_point_x: f32,
28973    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
28974    pub min_point_y: f32,
28975    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
28976    pub stream_id: u8,
28977    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
28978    pub camera_device_id: u8,
28979}
28980impl CAMERA_THERMAL_RANGE_DATA {
28981    pub const ENCODED_LEN: usize = 30usize;
28982    pub const DEFAULT: Self = Self {
28983        time_boot_ms: 0_u32,
28984        max: 0.0_f32,
28985        max_point_x: 0.0_f32,
28986        max_point_y: 0.0_f32,
28987        min: 0.0_f32,
28988        min_point_x: 0.0_f32,
28989        min_point_y: 0.0_f32,
28990        stream_id: 0_u8,
28991        camera_device_id: 0_u8,
28992    };
28993    #[cfg(feature = "arbitrary")]
28994    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28995        use arbitrary::{Arbitrary, Unstructured};
28996        let mut buf = [0u8; 1024];
28997        rng.fill_bytes(&mut buf);
28998        let mut unstructured = Unstructured::new(&buf);
28999        Self::arbitrary(&mut unstructured).unwrap_or_default()
29000    }
29001}
29002impl Default for CAMERA_THERMAL_RANGE_DATA {
29003    fn default() -> Self {
29004        Self::DEFAULT.clone()
29005    }
29006}
29007impl MessageData for CAMERA_THERMAL_RANGE_DATA {
29008    type Message = MavMessage;
29009    const ID: u32 = 277u32;
29010    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
29011    const EXTRA_CRC: u8 = 62u8;
29012    const ENCODED_LEN: usize = 30usize;
29013    fn deser(
29014        _version: MavlinkVersion,
29015        __input: &[u8],
29016    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29017        let avail_len = __input.len();
29018        let mut payload_buf = [0; Self::ENCODED_LEN];
29019        let mut buf = if avail_len < Self::ENCODED_LEN {
29020            payload_buf[0..avail_len].copy_from_slice(__input);
29021            Bytes::new(&payload_buf)
29022        } else {
29023            Bytes::new(__input)
29024        };
29025        let mut __struct = Self::default();
29026        __struct.time_boot_ms = buf.get_u32_le();
29027        __struct.max = buf.get_f32_le();
29028        __struct.max_point_x = buf.get_f32_le();
29029        __struct.max_point_y = buf.get_f32_le();
29030        __struct.min = buf.get_f32_le();
29031        __struct.min_point_x = buf.get_f32_le();
29032        __struct.min_point_y = buf.get_f32_le();
29033        __struct.stream_id = buf.get_u8();
29034        __struct.camera_device_id = buf.get_u8();
29035        Ok(__struct)
29036    }
29037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29038        let mut __tmp = BytesMut::new(bytes);
29039        #[allow(clippy::absurd_extreme_comparisons)]
29040        #[allow(unused_comparisons)]
29041        if __tmp.remaining() < Self::ENCODED_LEN {
29042            panic!(
29043                "buffer is too small (need {} bytes, but got {})",
29044                Self::ENCODED_LEN,
29045                __tmp.remaining(),
29046            )
29047        }
29048        __tmp.put_u32_le(self.time_boot_ms);
29049        __tmp.put_f32_le(self.max);
29050        __tmp.put_f32_le(self.max_point_x);
29051        __tmp.put_f32_le(self.max_point_y);
29052        __tmp.put_f32_le(self.min);
29053        __tmp.put_f32_le(self.min_point_x);
29054        __tmp.put_f32_le(self.min_point_y);
29055        __tmp.put_u8(self.stream_id);
29056        __tmp.put_u8(self.camera_device_id);
29057        if matches!(version, MavlinkVersion::V2) {
29058            let len = __tmp.len();
29059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29060        } else {
29061            __tmp.len()
29062        }
29063    }
29064}
29065#[doc = "id: 276"]
29066#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
29067#[derive(Debug, Clone, PartialEq)]
29068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29070pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
29071    #[doc = "Latitude of tracked object"]
29072    pub lat: i32,
29073    #[doc = "Longitude of tracked object"]
29074    pub lon: i32,
29075    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
29076    pub alt: f32,
29077    #[doc = "Horizontal accuracy. NAN if unknown"]
29078    pub h_acc: f32,
29079    #[doc = "Vertical accuracy. NAN if unknown"]
29080    pub v_acc: f32,
29081    #[doc = "North velocity of tracked object. NAN if unknown"]
29082    pub vel_n: f32,
29083    #[doc = "East velocity of tracked object. NAN if unknown"]
29084    pub vel_e: f32,
29085    #[doc = "Down velocity of tracked object. NAN if unknown"]
29086    pub vel_d: f32,
29087    #[doc = "Velocity accuracy. NAN if unknown"]
29088    pub vel_acc: f32,
29089    #[doc = "Distance between camera and tracked object. NAN if unknown"]
29090    pub dist: f32,
29091    #[doc = "Heading in radians, in NED. NAN if unknown"]
29092    pub hdg: f32,
29093    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
29094    pub hdg_acc: f32,
29095    #[doc = "Current tracking status"]
29096    pub tracking_status: CameraTrackingStatusFlags,
29097    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
29098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29099    pub camera_device_id: u8,
29100}
29101impl CAMERA_TRACKING_GEO_STATUS_DATA {
29102    pub const ENCODED_LEN: usize = 50usize;
29103    pub const DEFAULT: Self = Self {
29104        lat: 0_i32,
29105        lon: 0_i32,
29106        alt: 0.0_f32,
29107        h_acc: 0.0_f32,
29108        v_acc: 0.0_f32,
29109        vel_n: 0.0_f32,
29110        vel_e: 0.0_f32,
29111        vel_d: 0.0_f32,
29112        vel_acc: 0.0_f32,
29113        dist: 0.0_f32,
29114        hdg: 0.0_f32,
29115        hdg_acc: 0.0_f32,
29116        tracking_status: CameraTrackingStatusFlags::DEFAULT,
29117        camera_device_id: 0_u8,
29118    };
29119    #[cfg(feature = "arbitrary")]
29120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29121        use arbitrary::{Arbitrary, Unstructured};
29122        let mut buf = [0u8; 1024];
29123        rng.fill_bytes(&mut buf);
29124        let mut unstructured = Unstructured::new(&buf);
29125        Self::arbitrary(&mut unstructured).unwrap_or_default()
29126    }
29127}
29128impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
29129    fn default() -> Self {
29130        Self::DEFAULT.clone()
29131    }
29132}
29133impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
29134    type Message = MavMessage;
29135    const ID: u32 = 276u32;
29136    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
29137    const EXTRA_CRC: u8 = 18u8;
29138    const ENCODED_LEN: usize = 50usize;
29139    fn deser(
29140        _version: MavlinkVersion,
29141        __input: &[u8],
29142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29143        let avail_len = __input.len();
29144        let mut payload_buf = [0; Self::ENCODED_LEN];
29145        let mut buf = if avail_len < Self::ENCODED_LEN {
29146            payload_buf[0..avail_len].copy_from_slice(__input);
29147            Bytes::new(&payload_buf)
29148        } else {
29149            Bytes::new(__input)
29150        };
29151        let mut __struct = Self::default();
29152        __struct.lat = buf.get_i32_le();
29153        __struct.lon = buf.get_i32_le();
29154        __struct.alt = buf.get_f32_le();
29155        __struct.h_acc = buf.get_f32_le();
29156        __struct.v_acc = buf.get_f32_le();
29157        __struct.vel_n = buf.get_f32_le();
29158        __struct.vel_e = buf.get_f32_le();
29159        __struct.vel_d = buf.get_f32_le();
29160        __struct.vel_acc = buf.get_f32_le();
29161        __struct.dist = buf.get_f32_le();
29162        __struct.hdg = buf.get_f32_le();
29163        __struct.hdg_acc = buf.get_f32_le();
29164        let tmp = buf.get_u8();
29165        __struct.tracking_status =
29166            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29167                enum_type: "CameraTrackingStatusFlags",
29168                value: tmp as u32,
29169            })?;
29170        __struct.camera_device_id = buf.get_u8();
29171        Ok(__struct)
29172    }
29173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29174        let mut __tmp = BytesMut::new(bytes);
29175        #[allow(clippy::absurd_extreme_comparisons)]
29176        #[allow(unused_comparisons)]
29177        if __tmp.remaining() < Self::ENCODED_LEN {
29178            panic!(
29179                "buffer is too small (need {} bytes, but got {})",
29180                Self::ENCODED_LEN,
29181                __tmp.remaining(),
29182            )
29183        }
29184        __tmp.put_i32_le(self.lat);
29185        __tmp.put_i32_le(self.lon);
29186        __tmp.put_f32_le(self.alt);
29187        __tmp.put_f32_le(self.h_acc);
29188        __tmp.put_f32_le(self.v_acc);
29189        __tmp.put_f32_le(self.vel_n);
29190        __tmp.put_f32_le(self.vel_e);
29191        __tmp.put_f32_le(self.vel_d);
29192        __tmp.put_f32_le(self.vel_acc);
29193        __tmp.put_f32_le(self.dist);
29194        __tmp.put_f32_le(self.hdg);
29195        __tmp.put_f32_le(self.hdg_acc);
29196        __tmp.put_u8(self.tracking_status as u8);
29197        __tmp.put_u8(self.camera_device_id);
29198        if matches!(version, MavlinkVersion::V2) {
29199            let len = __tmp.len();
29200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29201        } else {
29202            __tmp.len()
29203        }
29204    }
29205}
29206#[doc = "id: 162"]
29207#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
29208#[derive(Debug, Clone, PartialEq)]
29209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29211pub struct FENCE_STATUS_DATA {
29212    #[doc = "Time (since boot) of last breach."]
29213    pub breach_time: u32,
29214    #[doc = "Number of fence breaches."]
29215    pub breach_count: u16,
29216    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
29217    pub breach_status: u8,
29218    #[doc = "Last breach type."]
29219    pub breach_type: FenceBreach,
29220    #[doc = "Active action to prevent fence breach"]
29221    #[cfg_attr(feature = "serde", serde(default))]
29222    pub breach_mitigation: FenceMitigate,
29223}
29224impl FENCE_STATUS_DATA {
29225    pub const ENCODED_LEN: usize = 9usize;
29226    pub const DEFAULT: Self = Self {
29227        breach_time: 0_u32,
29228        breach_count: 0_u16,
29229        breach_status: 0_u8,
29230        breach_type: FenceBreach::DEFAULT,
29231        breach_mitigation: FenceMitigate::DEFAULT,
29232    };
29233    #[cfg(feature = "arbitrary")]
29234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29235        use arbitrary::{Arbitrary, Unstructured};
29236        let mut buf = [0u8; 1024];
29237        rng.fill_bytes(&mut buf);
29238        let mut unstructured = Unstructured::new(&buf);
29239        Self::arbitrary(&mut unstructured).unwrap_or_default()
29240    }
29241}
29242impl Default for FENCE_STATUS_DATA {
29243    fn default() -> Self {
29244        Self::DEFAULT.clone()
29245    }
29246}
29247impl MessageData for FENCE_STATUS_DATA {
29248    type Message = MavMessage;
29249    const ID: u32 = 162u32;
29250    const NAME: &'static str = "FENCE_STATUS";
29251    const EXTRA_CRC: u8 = 189u8;
29252    const ENCODED_LEN: usize = 9usize;
29253    fn deser(
29254        _version: MavlinkVersion,
29255        __input: &[u8],
29256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29257        let avail_len = __input.len();
29258        let mut payload_buf = [0; Self::ENCODED_LEN];
29259        let mut buf = if avail_len < Self::ENCODED_LEN {
29260            payload_buf[0..avail_len].copy_from_slice(__input);
29261            Bytes::new(&payload_buf)
29262        } else {
29263            Bytes::new(__input)
29264        };
29265        let mut __struct = Self::default();
29266        __struct.breach_time = buf.get_u32_le();
29267        __struct.breach_count = buf.get_u16_le();
29268        __struct.breach_status = buf.get_u8();
29269        let tmp = buf.get_u8();
29270        __struct.breach_type =
29271            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29272                enum_type: "FenceBreach",
29273                value: tmp as u32,
29274            })?;
29275        let tmp = buf.get_u8();
29276        __struct.breach_mitigation =
29277            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29278                enum_type: "FenceMitigate",
29279                value: tmp as u32,
29280            })?;
29281        Ok(__struct)
29282    }
29283    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29284        let mut __tmp = BytesMut::new(bytes);
29285        #[allow(clippy::absurd_extreme_comparisons)]
29286        #[allow(unused_comparisons)]
29287        if __tmp.remaining() < Self::ENCODED_LEN {
29288            panic!(
29289                "buffer is too small (need {} bytes, but got {})",
29290                Self::ENCODED_LEN,
29291                __tmp.remaining(),
29292            )
29293        }
29294        __tmp.put_u32_le(self.breach_time);
29295        __tmp.put_u16_le(self.breach_count);
29296        __tmp.put_u8(self.breach_status);
29297        __tmp.put_u8(self.breach_type as u8);
29298        __tmp.put_u8(self.breach_mitigation as u8);
29299        if matches!(version, MavlinkVersion::V2) {
29300            let len = __tmp.len();
29301            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29302        } else {
29303            __tmp.len()
29304        }
29305    }
29306}
29307#[doc = "id: 284"]
29308#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
29309#[derive(Debug, Clone, PartialEq)]
29310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29312pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
29313    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
29314    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29315    pub q: [f32; 4],
29316    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
29317    pub angular_velocity_x: f32,
29318    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
29319    pub angular_velocity_y: f32,
29320    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
29321    pub angular_velocity_z: f32,
29322    #[doc = "Low level gimbal flags."]
29323    pub flags: GimbalDeviceFlags,
29324    #[doc = "System ID"]
29325    pub target_system: u8,
29326    #[doc = "Component ID"]
29327    pub target_component: u8,
29328}
29329impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
29330    pub const ENCODED_LEN: usize = 32usize;
29331    pub const DEFAULT: Self = Self {
29332        q: [0.0_f32; 4usize],
29333        angular_velocity_x: 0.0_f32,
29334        angular_velocity_y: 0.0_f32,
29335        angular_velocity_z: 0.0_f32,
29336        flags: GimbalDeviceFlags::DEFAULT,
29337        target_system: 0_u8,
29338        target_component: 0_u8,
29339    };
29340    #[cfg(feature = "arbitrary")]
29341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29342        use arbitrary::{Arbitrary, Unstructured};
29343        let mut buf = [0u8; 1024];
29344        rng.fill_bytes(&mut buf);
29345        let mut unstructured = Unstructured::new(&buf);
29346        Self::arbitrary(&mut unstructured).unwrap_or_default()
29347    }
29348}
29349impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
29350    fn default() -> Self {
29351        Self::DEFAULT.clone()
29352    }
29353}
29354impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
29355    type Message = MavMessage;
29356    const ID: u32 = 284u32;
29357    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
29358    const EXTRA_CRC: u8 = 99u8;
29359    const ENCODED_LEN: usize = 32usize;
29360    fn deser(
29361        _version: MavlinkVersion,
29362        __input: &[u8],
29363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29364        let avail_len = __input.len();
29365        let mut payload_buf = [0; Self::ENCODED_LEN];
29366        let mut buf = if avail_len < Self::ENCODED_LEN {
29367            payload_buf[0..avail_len].copy_from_slice(__input);
29368            Bytes::new(&payload_buf)
29369        } else {
29370            Bytes::new(__input)
29371        };
29372        let mut __struct = Self::default();
29373        for v in &mut __struct.q {
29374            let val = buf.get_f32_le();
29375            *v = val;
29376        }
29377        __struct.angular_velocity_x = buf.get_f32_le();
29378        __struct.angular_velocity_y = buf.get_f32_le();
29379        __struct.angular_velocity_z = buf.get_f32_le();
29380        let tmp = buf.get_u16_le();
29381        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
29382            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29383                flag_type: "GimbalDeviceFlags",
29384                value: tmp as u32,
29385            })?;
29386        __struct.target_system = buf.get_u8();
29387        __struct.target_component = buf.get_u8();
29388        Ok(__struct)
29389    }
29390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29391        let mut __tmp = BytesMut::new(bytes);
29392        #[allow(clippy::absurd_extreme_comparisons)]
29393        #[allow(unused_comparisons)]
29394        if __tmp.remaining() < Self::ENCODED_LEN {
29395            panic!(
29396                "buffer is too small (need {} bytes, but got {})",
29397                Self::ENCODED_LEN,
29398                __tmp.remaining(),
29399            )
29400        }
29401        for val in &self.q {
29402            __tmp.put_f32_le(*val);
29403        }
29404        __tmp.put_f32_le(self.angular_velocity_x);
29405        __tmp.put_f32_le(self.angular_velocity_y);
29406        __tmp.put_f32_le(self.angular_velocity_z);
29407        __tmp.put_u16_le(self.flags.bits());
29408        __tmp.put_u8(self.target_system);
29409        __tmp.put_u8(self.target_component);
29410        if matches!(version, MavlinkVersion::V2) {
29411            let len = __tmp.len();
29412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29413        } else {
29414            __tmp.len()
29415        }
29416    }
29417}
29418#[doc = "id: 33"]
29419#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
29420#[derive(Debug, Clone, PartialEq)]
29421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29423pub struct GLOBAL_POSITION_INT_DATA {
29424    #[doc = "Timestamp (time since system boot)."]
29425    pub time_boot_ms: u32,
29426    #[doc = "Latitude, expressed"]
29427    pub lat: i32,
29428    #[doc = "Longitude, expressed"]
29429    pub lon: i32,
29430    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
29431    pub alt: i32,
29432    #[doc = "Altitude above home"]
29433    pub relative_alt: i32,
29434    #[doc = "Ground X Speed (Latitude, positive north)"]
29435    pub vx: i16,
29436    #[doc = "Ground Y Speed (Longitude, positive east)"]
29437    pub vy: i16,
29438    #[doc = "Ground Z Speed (Altitude, positive down)"]
29439    pub vz: i16,
29440    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
29441    pub hdg: u16,
29442}
29443impl GLOBAL_POSITION_INT_DATA {
29444    pub const ENCODED_LEN: usize = 28usize;
29445    pub const DEFAULT: Self = Self {
29446        time_boot_ms: 0_u32,
29447        lat: 0_i32,
29448        lon: 0_i32,
29449        alt: 0_i32,
29450        relative_alt: 0_i32,
29451        vx: 0_i16,
29452        vy: 0_i16,
29453        vz: 0_i16,
29454        hdg: 0_u16,
29455    };
29456    #[cfg(feature = "arbitrary")]
29457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29458        use arbitrary::{Arbitrary, Unstructured};
29459        let mut buf = [0u8; 1024];
29460        rng.fill_bytes(&mut buf);
29461        let mut unstructured = Unstructured::new(&buf);
29462        Self::arbitrary(&mut unstructured).unwrap_or_default()
29463    }
29464}
29465impl Default for GLOBAL_POSITION_INT_DATA {
29466    fn default() -> Self {
29467        Self::DEFAULT.clone()
29468    }
29469}
29470impl MessageData for GLOBAL_POSITION_INT_DATA {
29471    type Message = MavMessage;
29472    const ID: u32 = 33u32;
29473    const NAME: &'static str = "GLOBAL_POSITION_INT";
29474    const EXTRA_CRC: u8 = 104u8;
29475    const ENCODED_LEN: usize = 28usize;
29476    fn deser(
29477        _version: MavlinkVersion,
29478        __input: &[u8],
29479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29480        let avail_len = __input.len();
29481        let mut payload_buf = [0; Self::ENCODED_LEN];
29482        let mut buf = if avail_len < Self::ENCODED_LEN {
29483            payload_buf[0..avail_len].copy_from_slice(__input);
29484            Bytes::new(&payload_buf)
29485        } else {
29486            Bytes::new(__input)
29487        };
29488        let mut __struct = Self::default();
29489        __struct.time_boot_ms = buf.get_u32_le();
29490        __struct.lat = buf.get_i32_le();
29491        __struct.lon = buf.get_i32_le();
29492        __struct.alt = buf.get_i32_le();
29493        __struct.relative_alt = buf.get_i32_le();
29494        __struct.vx = buf.get_i16_le();
29495        __struct.vy = buf.get_i16_le();
29496        __struct.vz = buf.get_i16_le();
29497        __struct.hdg = buf.get_u16_le();
29498        Ok(__struct)
29499    }
29500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29501        let mut __tmp = BytesMut::new(bytes);
29502        #[allow(clippy::absurd_extreme_comparisons)]
29503        #[allow(unused_comparisons)]
29504        if __tmp.remaining() < Self::ENCODED_LEN {
29505            panic!(
29506                "buffer is too small (need {} bytes, but got {})",
29507                Self::ENCODED_LEN,
29508                __tmp.remaining(),
29509            )
29510        }
29511        __tmp.put_u32_le(self.time_boot_ms);
29512        __tmp.put_i32_le(self.lat);
29513        __tmp.put_i32_le(self.lon);
29514        __tmp.put_i32_le(self.alt);
29515        __tmp.put_i32_le(self.relative_alt);
29516        __tmp.put_i16_le(self.vx);
29517        __tmp.put_i16_le(self.vy);
29518        __tmp.put_i16_le(self.vz);
29519        __tmp.put_u16_le(self.hdg);
29520        if matches!(version, MavlinkVersion::V2) {
29521            let len = __tmp.len();
29522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29523        } else {
29524            __tmp.len()
29525        }
29526    }
29527}
29528#[doc = "id: 81"]
29529#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
29530#[derive(Debug, Clone, PartialEq)]
29531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29533pub struct MANUAL_SETPOINT_DATA {
29534    #[doc = "Timestamp (time since system boot)."]
29535    pub time_boot_ms: u32,
29536    #[doc = "Desired roll rate"]
29537    pub roll: f32,
29538    #[doc = "Desired pitch rate"]
29539    pub pitch: f32,
29540    #[doc = "Desired yaw rate"]
29541    pub yaw: f32,
29542    #[doc = "Collective thrust, normalized to 0 .. 1"]
29543    pub thrust: f32,
29544    #[doc = "Flight mode switch position, 0.. 255"]
29545    pub mode_switch: u8,
29546    #[doc = "Override mode switch position, 0.. 255"]
29547    pub manual_override_switch: u8,
29548}
29549impl MANUAL_SETPOINT_DATA {
29550    pub const ENCODED_LEN: usize = 22usize;
29551    pub const DEFAULT: Self = Self {
29552        time_boot_ms: 0_u32,
29553        roll: 0.0_f32,
29554        pitch: 0.0_f32,
29555        yaw: 0.0_f32,
29556        thrust: 0.0_f32,
29557        mode_switch: 0_u8,
29558        manual_override_switch: 0_u8,
29559    };
29560    #[cfg(feature = "arbitrary")]
29561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29562        use arbitrary::{Arbitrary, Unstructured};
29563        let mut buf = [0u8; 1024];
29564        rng.fill_bytes(&mut buf);
29565        let mut unstructured = Unstructured::new(&buf);
29566        Self::arbitrary(&mut unstructured).unwrap_or_default()
29567    }
29568}
29569impl Default for MANUAL_SETPOINT_DATA {
29570    fn default() -> Self {
29571        Self::DEFAULT.clone()
29572    }
29573}
29574impl MessageData for MANUAL_SETPOINT_DATA {
29575    type Message = MavMessage;
29576    const ID: u32 = 81u32;
29577    const NAME: &'static str = "MANUAL_SETPOINT";
29578    const EXTRA_CRC: u8 = 106u8;
29579    const ENCODED_LEN: usize = 22usize;
29580    fn deser(
29581        _version: MavlinkVersion,
29582        __input: &[u8],
29583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29584        let avail_len = __input.len();
29585        let mut payload_buf = [0; Self::ENCODED_LEN];
29586        let mut buf = if avail_len < Self::ENCODED_LEN {
29587            payload_buf[0..avail_len].copy_from_slice(__input);
29588            Bytes::new(&payload_buf)
29589        } else {
29590            Bytes::new(__input)
29591        };
29592        let mut __struct = Self::default();
29593        __struct.time_boot_ms = buf.get_u32_le();
29594        __struct.roll = buf.get_f32_le();
29595        __struct.pitch = buf.get_f32_le();
29596        __struct.yaw = buf.get_f32_le();
29597        __struct.thrust = buf.get_f32_le();
29598        __struct.mode_switch = buf.get_u8();
29599        __struct.manual_override_switch = buf.get_u8();
29600        Ok(__struct)
29601    }
29602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29603        let mut __tmp = BytesMut::new(bytes);
29604        #[allow(clippy::absurd_extreme_comparisons)]
29605        #[allow(unused_comparisons)]
29606        if __tmp.remaining() < Self::ENCODED_LEN {
29607            panic!(
29608                "buffer is too small (need {} bytes, but got {})",
29609                Self::ENCODED_LEN,
29610                __tmp.remaining(),
29611            )
29612        }
29613        __tmp.put_u32_le(self.time_boot_ms);
29614        __tmp.put_f32_le(self.roll);
29615        __tmp.put_f32_le(self.pitch);
29616        __tmp.put_f32_le(self.yaw);
29617        __tmp.put_f32_le(self.thrust);
29618        __tmp.put_u8(self.mode_switch);
29619        __tmp.put_u8(self.manual_override_switch);
29620        if matches!(version, MavlinkVersion::V2) {
29621            let len = __tmp.len();
29622            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29623        } else {
29624            __tmp.len()
29625        }
29626    }
29627}
29628#[doc = "id: 135"]
29629#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29630#[derive(Debug, Clone, PartialEq)]
29631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29632#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29633pub struct TERRAIN_CHECK_DATA {
29634    #[doc = "Latitude"]
29635    pub lat: i32,
29636    #[doc = "Longitude"]
29637    pub lon: i32,
29638}
29639impl TERRAIN_CHECK_DATA {
29640    pub const ENCODED_LEN: usize = 8usize;
29641    pub const DEFAULT: Self = Self {
29642        lat: 0_i32,
29643        lon: 0_i32,
29644    };
29645    #[cfg(feature = "arbitrary")]
29646    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29647        use arbitrary::{Arbitrary, Unstructured};
29648        let mut buf = [0u8; 1024];
29649        rng.fill_bytes(&mut buf);
29650        let mut unstructured = Unstructured::new(&buf);
29651        Self::arbitrary(&mut unstructured).unwrap_or_default()
29652    }
29653}
29654impl Default for TERRAIN_CHECK_DATA {
29655    fn default() -> Self {
29656        Self::DEFAULT.clone()
29657    }
29658}
29659impl MessageData for TERRAIN_CHECK_DATA {
29660    type Message = MavMessage;
29661    const ID: u32 = 135u32;
29662    const NAME: &'static str = "TERRAIN_CHECK";
29663    const EXTRA_CRC: u8 = 203u8;
29664    const ENCODED_LEN: usize = 8usize;
29665    fn deser(
29666        _version: MavlinkVersion,
29667        __input: &[u8],
29668    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29669        let avail_len = __input.len();
29670        let mut payload_buf = [0; Self::ENCODED_LEN];
29671        let mut buf = if avail_len < Self::ENCODED_LEN {
29672            payload_buf[0..avail_len].copy_from_slice(__input);
29673            Bytes::new(&payload_buf)
29674        } else {
29675            Bytes::new(__input)
29676        };
29677        let mut __struct = Self::default();
29678        __struct.lat = buf.get_i32_le();
29679        __struct.lon = buf.get_i32_le();
29680        Ok(__struct)
29681    }
29682    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29683        let mut __tmp = BytesMut::new(bytes);
29684        #[allow(clippy::absurd_extreme_comparisons)]
29685        #[allow(unused_comparisons)]
29686        if __tmp.remaining() < Self::ENCODED_LEN {
29687            panic!(
29688                "buffer is too small (need {} bytes, but got {})",
29689                Self::ENCODED_LEN,
29690                __tmp.remaining(),
29691            )
29692        }
29693        __tmp.put_i32_le(self.lat);
29694        __tmp.put_i32_le(self.lon);
29695        if matches!(version, MavlinkVersion::V2) {
29696            let len = __tmp.len();
29697            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29698        } else {
29699            __tmp.len()
29700        }
29701    }
29702}
29703#[doc = "id: 63"]
29704#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
29705#[derive(Debug, Clone, PartialEq)]
29706#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29707#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29708pub struct GLOBAL_POSITION_INT_COV_DATA {
29709    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29710    pub time_usec: u64,
29711    #[doc = "Latitude"]
29712    pub lat: i32,
29713    #[doc = "Longitude"]
29714    pub lon: i32,
29715    #[doc = "Altitude in meters above MSL"]
29716    pub alt: i32,
29717    #[doc = "Altitude above ground"]
29718    pub relative_alt: i32,
29719    #[doc = "Ground X Speed (Latitude)"]
29720    pub vx: f32,
29721    #[doc = "Ground Y Speed (Longitude)"]
29722    pub vy: f32,
29723    #[doc = "Ground Z Speed (Altitude)"]
29724    pub vz: f32,
29725    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
29726    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29727    pub covariance: [f32; 36],
29728    #[doc = "Class id of the estimator this estimate originated from."]
29729    pub estimator_type: MavEstimatorType,
29730}
29731impl GLOBAL_POSITION_INT_COV_DATA {
29732    pub const ENCODED_LEN: usize = 181usize;
29733    pub const DEFAULT: Self = Self {
29734        time_usec: 0_u64,
29735        lat: 0_i32,
29736        lon: 0_i32,
29737        alt: 0_i32,
29738        relative_alt: 0_i32,
29739        vx: 0.0_f32,
29740        vy: 0.0_f32,
29741        vz: 0.0_f32,
29742        covariance: [0.0_f32; 36usize],
29743        estimator_type: MavEstimatorType::DEFAULT,
29744    };
29745    #[cfg(feature = "arbitrary")]
29746    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29747        use arbitrary::{Arbitrary, Unstructured};
29748        let mut buf = [0u8; 1024];
29749        rng.fill_bytes(&mut buf);
29750        let mut unstructured = Unstructured::new(&buf);
29751        Self::arbitrary(&mut unstructured).unwrap_or_default()
29752    }
29753}
29754impl Default for GLOBAL_POSITION_INT_COV_DATA {
29755    fn default() -> Self {
29756        Self::DEFAULT.clone()
29757    }
29758}
29759impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
29760    type Message = MavMessage;
29761    const ID: u32 = 63u32;
29762    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
29763    const EXTRA_CRC: u8 = 119u8;
29764    const ENCODED_LEN: usize = 181usize;
29765    fn deser(
29766        _version: MavlinkVersion,
29767        __input: &[u8],
29768    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29769        let avail_len = __input.len();
29770        let mut payload_buf = [0; Self::ENCODED_LEN];
29771        let mut buf = if avail_len < Self::ENCODED_LEN {
29772            payload_buf[0..avail_len].copy_from_slice(__input);
29773            Bytes::new(&payload_buf)
29774        } else {
29775            Bytes::new(__input)
29776        };
29777        let mut __struct = Self::default();
29778        __struct.time_usec = buf.get_u64_le();
29779        __struct.lat = buf.get_i32_le();
29780        __struct.lon = buf.get_i32_le();
29781        __struct.alt = buf.get_i32_le();
29782        __struct.relative_alt = buf.get_i32_le();
29783        __struct.vx = buf.get_f32_le();
29784        __struct.vy = buf.get_f32_le();
29785        __struct.vz = buf.get_f32_le();
29786        for v in &mut __struct.covariance {
29787            let val = buf.get_f32_le();
29788            *v = val;
29789        }
29790        let tmp = buf.get_u8();
29791        __struct.estimator_type =
29792            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29793                enum_type: "MavEstimatorType",
29794                value: tmp as u32,
29795            })?;
29796        Ok(__struct)
29797    }
29798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29799        let mut __tmp = BytesMut::new(bytes);
29800        #[allow(clippy::absurd_extreme_comparisons)]
29801        #[allow(unused_comparisons)]
29802        if __tmp.remaining() < Self::ENCODED_LEN {
29803            panic!(
29804                "buffer is too small (need {} bytes, but got {})",
29805                Self::ENCODED_LEN,
29806                __tmp.remaining(),
29807            )
29808        }
29809        __tmp.put_u64_le(self.time_usec);
29810        __tmp.put_i32_le(self.lat);
29811        __tmp.put_i32_le(self.lon);
29812        __tmp.put_i32_le(self.alt);
29813        __tmp.put_i32_le(self.relative_alt);
29814        __tmp.put_f32_le(self.vx);
29815        __tmp.put_f32_le(self.vy);
29816        __tmp.put_f32_le(self.vz);
29817        for val in &self.covariance {
29818            __tmp.put_f32_le(*val);
29819        }
29820        __tmp.put_u8(self.estimator_type as u8);
29821        if matches!(version, MavlinkVersion::V2) {
29822            let len = __tmp.len();
29823            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29824        } else {
29825            __tmp.len()
29826        }
29827    }
29828}
29829#[doc = "id: 20"]
29830#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
29831#[derive(Debug, Clone, PartialEq)]
29832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29834pub struct PARAM_REQUEST_READ_DATA {
29835    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
29836    pub param_index: i16,
29837    #[doc = "System ID"]
29838    pub target_system: u8,
29839    #[doc = "Component ID"]
29840    pub target_component: u8,
29841    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
29842    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29843    pub param_id: [u8; 16],
29844}
29845impl PARAM_REQUEST_READ_DATA {
29846    pub const ENCODED_LEN: usize = 20usize;
29847    pub const DEFAULT: Self = Self {
29848        param_index: 0_i16,
29849        target_system: 0_u8,
29850        target_component: 0_u8,
29851        param_id: [0_u8; 16usize],
29852    };
29853    #[cfg(feature = "arbitrary")]
29854    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29855        use arbitrary::{Arbitrary, Unstructured};
29856        let mut buf = [0u8; 1024];
29857        rng.fill_bytes(&mut buf);
29858        let mut unstructured = Unstructured::new(&buf);
29859        Self::arbitrary(&mut unstructured).unwrap_or_default()
29860    }
29861}
29862impl Default for PARAM_REQUEST_READ_DATA {
29863    fn default() -> Self {
29864        Self::DEFAULT.clone()
29865    }
29866}
29867impl MessageData for PARAM_REQUEST_READ_DATA {
29868    type Message = MavMessage;
29869    const ID: u32 = 20u32;
29870    const NAME: &'static str = "PARAM_REQUEST_READ";
29871    const EXTRA_CRC: u8 = 214u8;
29872    const ENCODED_LEN: usize = 20usize;
29873    fn deser(
29874        _version: MavlinkVersion,
29875        __input: &[u8],
29876    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29877        let avail_len = __input.len();
29878        let mut payload_buf = [0; Self::ENCODED_LEN];
29879        let mut buf = if avail_len < Self::ENCODED_LEN {
29880            payload_buf[0..avail_len].copy_from_slice(__input);
29881            Bytes::new(&payload_buf)
29882        } else {
29883            Bytes::new(__input)
29884        };
29885        let mut __struct = Self::default();
29886        __struct.param_index = buf.get_i16_le();
29887        __struct.target_system = buf.get_u8();
29888        __struct.target_component = buf.get_u8();
29889        for v in &mut __struct.param_id {
29890            let val = buf.get_u8();
29891            *v = val;
29892        }
29893        Ok(__struct)
29894    }
29895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29896        let mut __tmp = BytesMut::new(bytes);
29897        #[allow(clippy::absurd_extreme_comparisons)]
29898        #[allow(unused_comparisons)]
29899        if __tmp.remaining() < Self::ENCODED_LEN {
29900            panic!(
29901                "buffer is too small (need {} bytes, but got {})",
29902                Self::ENCODED_LEN,
29903                __tmp.remaining(),
29904            )
29905        }
29906        __tmp.put_i16_le(self.param_index);
29907        __tmp.put_u8(self.target_system);
29908        __tmp.put_u8(self.target_component);
29909        for val in &self.param_id {
29910            __tmp.put_u8(*val);
29911        }
29912        if matches!(version, MavlinkVersion::V2) {
29913            let len = __tmp.len();
29914            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29915        } else {
29916            __tmp.len()
29917        }
29918    }
29919}
29920#[doc = "id: 234"]
29921#[doc = "Message appropriate for high latency connections like Iridium."]
29922#[derive(Debug, Clone, PartialEq)]
29923#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29925pub struct HIGH_LATENCY_DATA {
29926    #[doc = "A bitfield for use for autopilot-specific flags."]
29927    pub custom_mode: u32,
29928    #[doc = "Latitude"]
29929    pub latitude: i32,
29930    #[doc = "Longitude"]
29931    pub longitude: i32,
29932    #[doc = "roll"]
29933    pub roll: i16,
29934    #[doc = "pitch"]
29935    pub pitch: i16,
29936    #[doc = "heading"]
29937    pub heading: u16,
29938    #[doc = "heading setpoint"]
29939    pub heading_sp: i16,
29940    #[doc = "Altitude above mean sea level"]
29941    pub altitude_amsl: i16,
29942    #[doc = "Altitude setpoint relative to the home position"]
29943    pub altitude_sp: i16,
29944    #[doc = "distance to target"]
29945    pub wp_distance: u16,
29946    #[doc = "Bitmap of enabled system modes."]
29947    pub base_mode: MavModeFlag,
29948    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
29949    pub landed_state: MavLandedState,
29950    #[doc = "throttle (percentage)"]
29951    pub throttle: i8,
29952    #[doc = "airspeed"]
29953    pub airspeed: u8,
29954    #[doc = "airspeed setpoint"]
29955    pub airspeed_sp: u8,
29956    #[doc = "groundspeed"]
29957    pub groundspeed: u8,
29958    #[doc = "climb rate"]
29959    pub climb_rate: i8,
29960    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
29961    pub gps_nsat: u8,
29962    #[doc = "GPS Fix type."]
29963    pub gps_fix_type: GpsFixType,
29964    #[doc = "Remaining battery (percentage)"]
29965    pub battery_remaining: u8,
29966    #[doc = "Autopilot temperature (degrees C)"]
29967    pub temperature: i8,
29968    #[doc = "Air temperature (degrees C) from airspeed sensor"]
29969    pub temperature_air: i8,
29970    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
29971    pub failsafe: u8,
29972    #[doc = "current waypoint number"]
29973    pub wp_num: u8,
29974}
29975impl HIGH_LATENCY_DATA {
29976    pub const ENCODED_LEN: usize = 40usize;
29977    pub const DEFAULT: Self = Self {
29978        custom_mode: 0_u32,
29979        latitude: 0_i32,
29980        longitude: 0_i32,
29981        roll: 0_i16,
29982        pitch: 0_i16,
29983        heading: 0_u16,
29984        heading_sp: 0_i16,
29985        altitude_amsl: 0_i16,
29986        altitude_sp: 0_i16,
29987        wp_distance: 0_u16,
29988        base_mode: MavModeFlag::DEFAULT,
29989        landed_state: MavLandedState::DEFAULT,
29990        throttle: 0_i8,
29991        airspeed: 0_u8,
29992        airspeed_sp: 0_u8,
29993        groundspeed: 0_u8,
29994        climb_rate: 0_i8,
29995        gps_nsat: 0_u8,
29996        gps_fix_type: GpsFixType::DEFAULT,
29997        battery_remaining: 0_u8,
29998        temperature: 0_i8,
29999        temperature_air: 0_i8,
30000        failsafe: 0_u8,
30001        wp_num: 0_u8,
30002    };
30003    #[cfg(feature = "arbitrary")]
30004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30005        use arbitrary::{Arbitrary, Unstructured};
30006        let mut buf = [0u8; 1024];
30007        rng.fill_bytes(&mut buf);
30008        let mut unstructured = Unstructured::new(&buf);
30009        Self::arbitrary(&mut unstructured).unwrap_or_default()
30010    }
30011}
30012impl Default for HIGH_LATENCY_DATA {
30013    fn default() -> Self {
30014        Self::DEFAULT.clone()
30015    }
30016}
30017impl MessageData for HIGH_LATENCY_DATA {
30018    type Message = MavMessage;
30019    const ID: u32 = 234u32;
30020    const NAME: &'static str = "HIGH_LATENCY";
30021    const EXTRA_CRC: u8 = 150u8;
30022    const ENCODED_LEN: usize = 40usize;
30023    fn deser(
30024        _version: MavlinkVersion,
30025        __input: &[u8],
30026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30027        let avail_len = __input.len();
30028        let mut payload_buf = [0; Self::ENCODED_LEN];
30029        let mut buf = if avail_len < Self::ENCODED_LEN {
30030            payload_buf[0..avail_len].copy_from_slice(__input);
30031            Bytes::new(&payload_buf)
30032        } else {
30033            Bytes::new(__input)
30034        };
30035        let mut __struct = Self::default();
30036        __struct.custom_mode = buf.get_u32_le();
30037        __struct.latitude = buf.get_i32_le();
30038        __struct.longitude = buf.get_i32_le();
30039        __struct.roll = buf.get_i16_le();
30040        __struct.pitch = buf.get_i16_le();
30041        __struct.heading = buf.get_u16_le();
30042        __struct.heading_sp = buf.get_i16_le();
30043        __struct.altitude_amsl = buf.get_i16_le();
30044        __struct.altitude_sp = buf.get_i16_le();
30045        __struct.wp_distance = buf.get_u16_le();
30046        let tmp = buf.get_u8();
30047        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
30048            ::mavlink_core::error::ParserError::InvalidFlag {
30049                flag_type: "MavModeFlag",
30050                value: tmp as u32,
30051            },
30052        )?;
30053        let tmp = buf.get_u8();
30054        __struct.landed_state =
30055            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30056                enum_type: "MavLandedState",
30057                value: tmp as u32,
30058            })?;
30059        __struct.throttle = buf.get_i8();
30060        __struct.airspeed = buf.get_u8();
30061        __struct.airspeed_sp = buf.get_u8();
30062        __struct.groundspeed = buf.get_u8();
30063        __struct.climb_rate = buf.get_i8();
30064        __struct.gps_nsat = buf.get_u8();
30065        let tmp = buf.get_u8();
30066        __struct.gps_fix_type =
30067            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30068                enum_type: "GpsFixType",
30069                value: tmp as u32,
30070            })?;
30071        __struct.battery_remaining = buf.get_u8();
30072        __struct.temperature = buf.get_i8();
30073        __struct.temperature_air = buf.get_i8();
30074        __struct.failsafe = buf.get_u8();
30075        __struct.wp_num = buf.get_u8();
30076        Ok(__struct)
30077    }
30078    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30079        let mut __tmp = BytesMut::new(bytes);
30080        #[allow(clippy::absurd_extreme_comparisons)]
30081        #[allow(unused_comparisons)]
30082        if __tmp.remaining() < Self::ENCODED_LEN {
30083            panic!(
30084                "buffer is too small (need {} bytes, but got {})",
30085                Self::ENCODED_LEN,
30086                __tmp.remaining(),
30087            )
30088        }
30089        __tmp.put_u32_le(self.custom_mode);
30090        __tmp.put_i32_le(self.latitude);
30091        __tmp.put_i32_le(self.longitude);
30092        __tmp.put_i16_le(self.roll);
30093        __tmp.put_i16_le(self.pitch);
30094        __tmp.put_u16_le(self.heading);
30095        __tmp.put_i16_le(self.heading_sp);
30096        __tmp.put_i16_le(self.altitude_amsl);
30097        __tmp.put_i16_le(self.altitude_sp);
30098        __tmp.put_u16_le(self.wp_distance);
30099        __tmp.put_u8(self.base_mode.bits());
30100        __tmp.put_u8(self.landed_state as u8);
30101        __tmp.put_i8(self.throttle);
30102        __tmp.put_u8(self.airspeed);
30103        __tmp.put_u8(self.airspeed_sp);
30104        __tmp.put_u8(self.groundspeed);
30105        __tmp.put_i8(self.climb_rate);
30106        __tmp.put_u8(self.gps_nsat);
30107        __tmp.put_u8(self.gps_fix_type as u8);
30108        __tmp.put_u8(self.battery_remaining);
30109        __tmp.put_i8(self.temperature);
30110        __tmp.put_i8(self.temperature_air);
30111        __tmp.put_u8(self.failsafe);
30112        __tmp.put_u8(self.wp_num);
30113        if matches!(version, MavlinkVersion::V2) {
30114            let len = __tmp.len();
30115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30116        } else {
30117            __tmp.len()
30118        }
30119    }
30120}
30121#[doc = "id: 129"]
30122#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
30123#[derive(Debug, Clone, PartialEq)]
30124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30126pub struct SCALED_IMU3_DATA {
30127    #[doc = "Timestamp (time since system boot)."]
30128    pub time_boot_ms: u32,
30129    #[doc = "X acceleration"]
30130    pub xacc: i16,
30131    #[doc = "Y acceleration"]
30132    pub yacc: i16,
30133    #[doc = "Z acceleration"]
30134    pub zacc: i16,
30135    #[doc = "Angular speed around X axis"]
30136    pub xgyro: i16,
30137    #[doc = "Angular speed around Y axis"]
30138    pub ygyro: i16,
30139    #[doc = "Angular speed around Z axis"]
30140    pub zgyro: i16,
30141    #[doc = "X Magnetic field"]
30142    pub xmag: i16,
30143    #[doc = "Y Magnetic field"]
30144    pub ymag: i16,
30145    #[doc = "Z Magnetic field"]
30146    pub zmag: i16,
30147    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
30148    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30149    pub temperature: i16,
30150}
30151impl SCALED_IMU3_DATA {
30152    pub const ENCODED_LEN: usize = 24usize;
30153    pub const DEFAULT: Self = Self {
30154        time_boot_ms: 0_u32,
30155        xacc: 0_i16,
30156        yacc: 0_i16,
30157        zacc: 0_i16,
30158        xgyro: 0_i16,
30159        ygyro: 0_i16,
30160        zgyro: 0_i16,
30161        xmag: 0_i16,
30162        ymag: 0_i16,
30163        zmag: 0_i16,
30164        temperature: 0_i16,
30165    };
30166    #[cfg(feature = "arbitrary")]
30167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30168        use arbitrary::{Arbitrary, Unstructured};
30169        let mut buf = [0u8; 1024];
30170        rng.fill_bytes(&mut buf);
30171        let mut unstructured = Unstructured::new(&buf);
30172        Self::arbitrary(&mut unstructured).unwrap_or_default()
30173    }
30174}
30175impl Default for SCALED_IMU3_DATA {
30176    fn default() -> Self {
30177        Self::DEFAULT.clone()
30178    }
30179}
30180impl MessageData for SCALED_IMU3_DATA {
30181    type Message = MavMessage;
30182    const ID: u32 = 129u32;
30183    const NAME: &'static str = "SCALED_IMU3";
30184    const EXTRA_CRC: u8 = 46u8;
30185    const ENCODED_LEN: usize = 24usize;
30186    fn deser(
30187        _version: MavlinkVersion,
30188        __input: &[u8],
30189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30190        let avail_len = __input.len();
30191        let mut payload_buf = [0; Self::ENCODED_LEN];
30192        let mut buf = if avail_len < Self::ENCODED_LEN {
30193            payload_buf[0..avail_len].copy_from_slice(__input);
30194            Bytes::new(&payload_buf)
30195        } else {
30196            Bytes::new(__input)
30197        };
30198        let mut __struct = Self::default();
30199        __struct.time_boot_ms = buf.get_u32_le();
30200        __struct.xacc = buf.get_i16_le();
30201        __struct.yacc = buf.get_i16_le();
30202        __struct.zacc = buf.get_i16_le();
30203        __struct.xgyro = buf.get_i16_le();
30204        __struct.ygyro = buf.get_i16_le();
30205        __struct.zgyro = buf.get_i16_le();
30206        __struct.xmag = buf.get_i16_le();
30207        __struct.ymag = buf.get_i16_le();
30208        __struct.zmag = buf.get_i16_le();
30209        __struct.temperature = buf.get_i16_le();
30210        Ok(__struct)
30211    }
30212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30213        let mut __tmp = BytesMut::new(bytes);
30214        #[allow(clippy::absurd_extreme_comparisons)]
30215        #[allow(unused_comparisons)]
30216        if __tmp.remaining() < Self::ENCODED_LEN {
30217            panic!(
30218                "buffer is too small (need {} bytes, but got {})",
30219                Self::ENCODED_LEN,
30220                __tmp.remaining(),
30221            )
30222        }
30223        __tmp.put_u32_le(self.time_boot_ms);
30224        __tmp.put_i16_le(self.xacc);
30225        __tmp.put_i16_le(self.yacc);
30226        __tmp.put_i16_le(self.zacc);
30227        __tmp.put_i16_le(self.xgyro);
30228        __tmp.put_i16_le(self.ygyro);
30229        __tmp.put_i16_le(self.zgyro);
30230        __tmp.put_i16_le(self.xmag);
30231        __tmp.put_i16_le(self.ymag);
30232        __tmp.put_i16_le(self.zmag);
30233        __tmp.put_i16_le(self.temperature);
30234        if matches!(version, MavlinkVersion::V2) {
30235            let len = __tmp.len();
30236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30237        } else {
30238            __tmp.len()
30239        }
30240    }
30241}
30242#[doc = "id: 107"]
30243#[doc = "The IMU readings in SI units in NED body frame."]
30244#[derive(Debug, Clone, PartialEq)]
30245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30247pub struct HIL_SENSOR_DATA {
30248    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30249    pub time_usec: u64,
30250    #[doc = "X acceleration"]
30251    pub xacc: f32,
30252    #[doc = "Y acceleration"]
30253    pub yacc: f32,
30254    #[doc = "Z acceleration"]
30255    pub zacc: f32,
30256    #[doc = "Angular speed around X axis in body frame"]
30257    pub xgyro: f32,
30258    #[doc = "Angular speed around Y axis in body frame"]
30259    pub ygyro: f32,
30260    #[doc = "Angular speed around Z axis in body frame"]
30261    pub zgyro: f32,
30262    #[doc = "X Magnetic field"]
30263    pub xmag: f32,
30264    #[doc = "Y Magnetic field"]
30265    pub ymag: f32,
30266    #[doc = "Z Magnetic field"]
30267    pub zmag: f32,
30268    #[doc = "Absolute pressure"]
30269    pub abs_pressure: f32,
30270    #[doc = "Differential pressure (airspeed)"]
30271    pub diff_pressure: f32,
30272    #[doc = "Altitude calculated from pressure"]
30273    pub pressure_alt: f32,
30274    #[doc = "Temperature"]
30275    pub temperature: f32,
30276    #[doc = "Bitmap for fields that have updated since last message"]
30277    pub fields_updated: HilSensorUpdatedFlags,
30278    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
30279    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30280    pub id: u8,
30281}
30282impl HIL_SENSOR_DATA {
30283    pub const ENCODED_LEN: usize = 65usize;
30284    pub const DEFAULT: Self = Self {
30285        time_usec: 0_u64,
30286        xacc: 0.0_f32,
30287        yacc: 0.0_f32,
30288        zacc: 0.0_f32,
30289        xgyro: 0.0_f32,
30290        ygyro: 0.0_f32,
30291        zgyro: 0.0_f32,
30292        xmag: 0.0_f32,
30293        ymag: 0.0_f32,
30294        zmag: 0.0_f32,
30295        abs_pressure: 0.0_f32,
30296        diff_pressure: 0.0_f32,
30297        pressure_alt: 0.0_f32,
30298        temperature: 0.0_f32,
30299        fields_updated: HilSensorUpdatedFlags::DEFAULT,
30300        id: 0_u8,
30301    };
30302    #[cfg(feature = "arbitrary")]
30303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30304        use arbitrary::{Arbitrary, Unstructured};
30305        let mut buf = [0u8; 1024];
30306        rng.fill_bytes(&mut buf);
30307        let mut unstructured = Unstructured::new(&buf);
30308        Self::arbitrary(&mut unstructured).unwrap_or_default()
30309    }
30310}
30311impl Default for HIL_SENSOR_DATA {
30312    fn default() -> Self {
30313        Self::DEFAULT.clone()
30314    }
30315}
30316impl MessageData for HIL_SENSOR_DATA {
30317    type Message = MavMessage;
30318    const ID: u32 = 107u32;
30319    const NAME: &'static str = "HIL_SENSOR";
30320    const EXTRA_CRC: u8 = 108u8;
30321    const ENCODED_LEN: usize = 65usize;
30322    fn deser(
30323        _version: MavlinkVersion,
30324        __input: &[u8],
30325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30326        let avail_len = __input.len();
30327        let mut payload_buf = [0; Self::ENCODED_LEN];
30328        let mut buf = if avail_len < Self::ENCODED_LEN {
30329            payload_buf[0..avail_len].copy_from_slice(__input);
30330            Bytes::new(&payload_buf)
30331        } else {
30332            Bytes::new(__input)
30333        };
30334        let mut __struct = Self::default();
30335        __struct.time_usec = buf.get_u64_le();
30336        __struct.xacc = buf.get_f32_le();
30337        __struct.yacc = buf.get_f32_le();
30338        __struct.zacc = buf.get_f32_le();
30339        __struct.xgyro = buf.get_f32_le();
30340        __struct.ygyro = buf.get_f32_le();
30341        __struct.zgyro = buf.get_f32_le();
30342        __struct.xmag = buf.get_f32_le();
30343        __struct.ymag = buf.get_f32_le();
30344        __struct.zmag = buf.get_f32_le();
30345        __struct.abs_pressure = buf.get_f32_le();
30346        __struct.diff_pressure = buf.get_f32_le();
30347        __struct.pressure_alt = buf.get_f32_le();
30348        __struct.temperature = buf.get_f32_le();
30349        let tmp = buf.get_u32_le();
30350        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
30351            tmp & HilSensorUpdatedFlags::all().bits(),
30352        )
30353        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30354            flag_type: "HilSensorUpdatedFlags",
30355            value: tmp as u32,
30356        })?;
30357        __struct.id = buf.get_u8();
30358        Ok(__struct)
30359    }
30360    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30361        let mut __tmp = BytesMut::new(bytes);
30362        #[allow(clippy::absurd_extreme_comparisons)]
30363        #[allow(unused_comparisons)]
30364        if __tmp.remaining() < Self::ENCODED_LEN {
30365            panic!(
30366                "buffer is too small (need {} bytes, but got {})",
30367                Self::ENCODED_LEN,
30368                __tmp.remaining(),
30369            )
30370        }
30371        __tmp.put_u64_le(self.time_usec);
30372        __tmp.put_f32_le(self.xacc);
30373        __tmp.put_f32_le(self.yacc);
30374        __tmp.put_f32_le(self.zacc);
30375        __tmp.put_f32_le(self.xgyro);
30376        __tmp.put_f32_le(self.ygyro);
30377        __tmp.put_f32_le(self.zgyro);
30378        __tmp.put_f32_le(self.xmag);
30379        __tmp.put_f32_le(self.ymag);
30380        __tmp.put_f32_le(self.zmag);
30381        __tmp.put_f32_le(self.abs_pressure);
30382        __tmp.put_f32_le(self.diff_pressure);
30383        __tmp.put_f32_le(self.pressure_alt);
30384        __tmp.put_f32_le(self.temperature);
30385        __tmp.put_u32_le(self.fields_updated.bits());
30386        __tmp.put_u8(self.id);
30387        if matches!(version, MavlinkVersion::V2) {
30388            let len = __tmp.len();
30389            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30390        } else {
30391            __tmp.len()
30392        }
30393    }
30394}
30395#[doc = "id: 100"]
30396#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
30397#[derive(Debug, Clone, PartialEq)]
30398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30400pub struct OPTICAL_FLOW_DATA {
30401    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30402    pub time_usec: u64,
30403    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
30404    pub flow_comp_m_x: f32,
30405    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
30406    pub flow_comp_m_y: f32,
30407    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
30408    pub ground_distance: f32,
30409    #[doc = "Flow in x-sensor direction"]
30410    pub flow_x: i16,
30411    #[doc = "Flow in y-sensor direction"]
30412    pub flow_y: i16,
30413    #[doc = "Sensor ID"]
30414    pub sensor_id: u8,
30415    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
30416    pub quality: u8,
30417    #[doc = "Flow rate about X axis"]
30418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30419    pub flow_rate_x: f32,
30420    #[doc = "Flow rate about Y axis"]
30421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30422    pub flow_rate_y: f32,
30423}
30424impl OPTICAL_FLOW_DATA {
30425    pub const ENCODED_LEN: usize = 34usize;
30426    pub const DEFAULT: Self = Self {
30427        time_usec: 0_u64,
30428        flow_comp_m_x: 0.0_f32,
30429        flow_comp_m_y: 0.0_f32,
30430        ground_distance: 0.0_f32,
30431        flow_x: 0_i16,
30432        flow_y: 0_i16,
30433        sensor_id: 0_u8,
30434        quality: 0_u8,
30435        flow_rate_x: 0.0_f32,
30436        flow_rate_y: 0.0_f32,
30437    };
30438    #[cfg(feature = "arbitrary")]
30439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30440        use arbitrary::{Arbitrary, Unstructured};
30441        let mut buf = [0u8; 1024];
30442        rng.fill_bytes(&mut buf);
30443        let mut unstructured = Unstructured::new(&buf);
30444        Self::arbitrary(&mut unstructured).unwrap_or_default()
30445    }
30446}
30447impl Default for OPTICAL_FLOW_DATA {
30448    fn default() -> Self {
30449        Self::DEFAULT.clone()
30450    }
30451}
30452impl MessageData for OPTICAL_FLOW_DATA {
30453    type Message = MavMessage;
30454    const ID: u32 = 100u32;
30455    const NAME: &'static str = "OPTICAL_FLOW";
30456    const EXTRA_CRC: u8 = 175u8;
30457    const ENCODED_LEN: usize = 34usize;
30458    fn deser(
30459        _version: MavlinkVersion,
30460        __input: &[u8],
30461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30462        let avail_len = __input.len();
30463        let mut payload_buf = [0; Self::ENCODED_LEN];
30464        let mut buf = if avail_len < Self::ENCODED_LEN {
30465            payload_buf[0..avail_len].copy_from_slice(__input);
30466            Bytes::new(&payload_buf)
30467        } else {
30468            Bytes::new(__input)
30469        };
30470        let mut __struct = Self::default();
30471        __struct.time_usec = buf.get_u64_le();
30472        __struct.flow_comp_m_x = buf.get_f32_le();
30473        __struct.flow_comp_m_y = buf.get_f32_le();
30474        __struct.ground_distance = buf.get_f32_le();
30475        __struct.flow_x = buf.get_i16_le();
30476        __struct.flow_y = buf.get_i16_le();
30477        __struct.sensor_id = buf.get_u8();
30478        __struct.quality = buf.get_u8();
30479        __struct.flow_rate_x = buf.get_f32_le();
30480        __struct.flow_rate_y = buf.get_f32_le();
30481        Ok(__struct)
30482    }
30483    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30484        let mut __tmp = BytesMut::new(bytes);
30485        #[allow(clippy::absurd_extreme_comparisons)]
30486        #[allow(unused_comparisons)]
30487        if __tmp.remaining() < Self::ENCODED_LEN {
30488            panic!(
30489                "buffer is too small (need {} bytes, but got {})",
30490                Self::ENCODED_LEN,
30491                __tmp.remaining(),
30492            )
30493        }
30494        __tmp.put_u64_le(self.time_usec);
30495        __tmp.put_f32_le(self.flow_comp_m_x);
30496        __tmp.put_f32_le(self.flow_comp_m_y);
30497        __tmp.put_f32_le(self.ground_distance);
30498        __tmp.put_i16_le(self.flow_x);
30499        __tmp.put_i16_le(self.flow_y);
30500        __tmp.put_u8(self.sensor_id);
30501        __tmp.put_u8(self.quality);
30502        __tmp.put_f32_le(self.flow_rate_x);
30503        __tmp.put_f32_le(self.flow_rate_y);
30504        if matches!(version, MavlinkVersion::V2) {
30505            let len = __tmp.len();
30506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30507        } else {
30508            __tmp.len()
30509        }
30510    }
30511}
30512#[doc = "id: 372"]
30513#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
30514#[derive(Debug, Clone, PartialEq)]
30515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30517pub struct BATTERY_INFO_DATA {
30518    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
30519    pub discharge_minimum_voltage: f32,
30520    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
30521    pub charging_minimum_voltage: f32,
30522    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
30523    pub resting_minimum_voltage: f32,
30524    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
30525    pub charging_maximum_voltage: f32,
30526    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
30527    pub charging_maximum_current: f32,
30528    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
30529    pub nominal_voltage: f32,
30530    #[doc = "Maximum pack discharge current. 0: field not provided."]
30531    pub discharge_maximum_current: f32,
30532    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
30533    pub discharge_maximum_burst_current: f32,
30534    #[doc = "Fully charged design capacity. 0: field not provided."]
30535    pub design_capacity: f32,
30536    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
30537    pub full_charge_capacity: f32,
30538    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
30539    pub cycle_count: u16,
30540    #[doc = "Battery weight. 0: field not provided."]
30541    pub weight: u16,
30542    #[doc = "Battery ID"]
30543    pub id: u8,
30544    #[doc = "Function of the battery."]
30545    pub battery_function: MavBatteryFunction,
30546    #[doc = "Type (chemistry) of the battery."]
30547    pub mavtype: MavBatteryType,
30548    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
30549    pub state_of_health: u8,
30550    #[doc = "Number of battery cells in series. 0: field not provided."]
30551    pub cells_in_series: u8,
30552    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
30553    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30554    pub manufacture_date: [u8; 9],
30555    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
30556    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30557    pub serial_number: [u8; 32],
30558    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
30559    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30560    pub name: [u8; 50],
30561}
30562impl BATTERY_INFO_DATA {
30563    pub const ENCODED_LEN: usize = 140usize;
30564    pub const DEFAULT: Self = Self {
30565        discharge_minimum_voltage: 0.0_f32,
30566        charging_minimum_voltage: 0.0_f32,
30567        resting_minimum_voltage: 0.0_f32,
30568        charging_maximum_voltage: 0.0_f32,
30569        charging_maximum_current: 0.0_f32,
30570        nominal_voltage: 0.0_f32,
30571        discharge_maximum_current: 0.0_f32,
30572        discharge_maximum_burst_current: 0.0_f32,
30573        design_capacity: 0.0_f32,
30574        full_charge_capacity: 0.0_f32,
30575        cycle_count: 0_u16,
30576        weight: 0_u16,
30577        id: 0_u8,
30578        battery_function: MavBatteryFunction::DEFAULT,
30579        mavtype: MavBatteryType::DEFAULT,
30580        state_of_health: 0_u8,
30581        cells_in_series: 0_u8,
30582        manufacture_date: [0_u8; 9usize],
30583        serial_number: [0_u8; 32usize],
30584        name: [0_u8; 50usize],
30585    };
30586    #[cfg(feature = "arbitrary")]
30587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30588        use arbitrary::{Arbitrary, Unstructured};
30589        let mut buf = [0u8; 1024];
30590        rng.fill_bytes(&mut buf);
30591        let mut unstructured = Unstructured::new(&buf);
30592        Self::arbitrary(&mut unstructured).unwrap_or_default()
30593    }
30594}
30595impl Default for BATTERY_INFO_DATA {
30596    fn default() -> Self {
30597        Self::DEFAULT.clone()
30598    }
30599}
30600impl MessageData for BATTERY_INFO_DATA {
30601    type Message = MavMessage;
30602    const ID: u32 = 372u32;
30603    const NAME: &'static str = "BATTERY_INFO";
30604    const EXTRA_CRC: u8 = 26u8;
30605    const ENCODED_LEN: usize = 140usize;
30606    fn deser(
30607        _version: MavlinkVersion,
30608        __input: &[u8],
30609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30610        let avail_len = __input.len();
30611        let mut payload_buf = [0; Self::ENCODED_LEN];
30612        let mut buf = if avail_len < Self::ENCODED_LEN {
30613            payload_buf[0..avail_len].copy_from_slice(__input);
30614            Bytes::new(&payload_buf)
30615        } else {
30616            Bytes::new(__input)
30617        };
30618        let mut __struct = Self::default();
30619        __struct.discharge_minimum_voltage = buf.get_f32_le();
30620        __struct.charging_minimum_voltage = buf.get_f32_le();
30621        __struct.resting_minimum_voltage = buf.get_f32_le();
30622        __struct.charging_maximum_voltage = buf.get_f32_le();
30623        __struct.charging_maximum_current = buf.get_f32_le();
30624        __struct.nominal_voltage = buf.get_f32_le();
30625        __struct.discharge_maximum_current = buf.get_f32_le();
30626        __struct.discharge_maximum_burst_current = buf.get_f32_le();
30627        __struct.design_capacity = buf.get_f32_le();
30628        __struct.full_charge_capacity = buf.get_f32_le();
30629        __struct.cycle_count = buf.get_u16_le();
30630        __struct.weight = buf.get_u16_le();
30631        __struct.id = buf.get_u8();
30632        let tmp = buf.get_u8();
30633        __struct.battery_function =
30634            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30635                enum_type: "MavBatteryFunction",
30636                value: tmp as u32,
30637            })?;
30638        let tmp = buf.get_u8();
30639        __struct.mavtype =
30640            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30641                enum_type: "MavBatteryType",
30642                value: tmp as u32,
30643            })?;
30644        __struct.state_of_health = buf.get_u8();
30645        __struct.cells_in_series = buf.get_u8();
30646        for v in &mut __struct.manufacture_date {
30647            let val = buf.get_u8();
30648            *v = val;
30649        }
30650        for v in &mut __struct.serial_number {
30651            let val = buf.get_u8();
30652            *v = val;
30653        }
30654        for v in &mut __struct.name {
30655            let val = buf.get_u8();
30656            *v = val;
30657        }
30658        Ok(__struct)
30659    }
30660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30661        let mut __tmp = BytesMut::new(bytes);
30662        #[allow(clippy::absurd_extreme_comparisons)]
30663        #[allow(unused_comparisons)]
30664        if __tmp.remaining() < Self::ENCODED_LEN {
30665            panic!(
30666                "buffer is too small (need {} bytes, but got {})",
30667                Self::ENCODED_LEN,
30668                __tmp.remaining(),
30669            )
30670        }
30671        __tmp.put_f32_le(self.discharge_minimum_voltage);
30672        __tmp.put_f32_le(self.charging_minimum_voltage);
30673        __tmp.put_f32_le(self.resting_minimum_voltage);
30674        __tmp.put_f32_le(self.charging_maximum_voltage);
30675        __tmp.put_f32_le(self.charging_maximum_current);
30676        __tmp.put_f32_le(self.nominal_voltage);
30677        __tmp.put_f32_le(self.discharge_maximum_current);
30678        __tmp.put_f32_le(self.discharge_maximum_burst_current);
30679        __tmp.put_f32_le(self.design_capacity);
30680        __tmp.put_f32_le(self.full_charge_capacity);
30681        __tmp.put_u16_le(self.cycle_count);
30682        __tmp.put_u16_le(self.weight);
30683        __tmp.put_u8(self.id);
30684        __tmp.put_u8(self.battery_function as u8);
30685        __tmp.put_u8(self.mavtype as u8);
30686        __tmp.put_u8(self.state_of_health);
30687        __tmp.put_u8(self.cells_in_series);
30688        for val in &self.manufacture_date {
30689            __tmp.put_u8(*val);
30690        }
30691        for val in &self.serial_number {
30692            __tmp.put_u8(*val);
30693        }
30694        for val in &self.name {
30695            __tmp.put_u8(*val);
30696        }
30697        if matches!(version, MavlinkVersion::V2) {
30698            let len = __tmp.len();
30699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30700        } else {
30701            __tmp.len()
30702        }
30703    }
30704}
30705#[doc = "id: 45"]
30706#[doc = "Delete all mission items at once."]
30707#[derive(Debug, Clone, PartialEq)]
30708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30710pub struct MISSION_CLEAR_ALL_DATA {
30711    #[doc = "System ID"]
30712    pub target_system: u8,
30713    #[doc = "Component ID"]
30714    pub target_component: u8,
30715    #[doc = "Mission type."]
30716    #[cfg_attr(feature = "serde", serde(default))]
30717    pub mission_type: MavMissionType,
30718}
30719impl MISSION_CLEAR_ALL_DATA {
30720    pub const ENCODED_LEN: usize = 3usize;
30721    pub const DEFAULT: Self = Self {
30722        target_system: 0_u8,
30723        target_component: 0_u8,
30724        mission_type: MavMissionType::DEFAULT,
30725    };
30726    #[cfg(feature = "arbitrary")]
30727    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30728        use arbitrary::{Arbitrary, Unstructured};
30729        let mut buf = [0u8; 1024];
30730        rng.fill_bytes(&mut buf);
30731        let mut unstructured = Unstructured::new(&buf);
30732        Self::arbitrary(&mut unstructured).unwrap_or_default()
30733    }
30734}
30735impl Default for MISSION_CLEAR_ALL_DATA {
30736    fn default() -> Self {
30737        Self::DEFAULT.clone()
30738    }
30739}
30740impl MessageData for MISSION_CLEAR_ALL_DATA {
30741    type Message = MavMessage;
30742    const ID: u32 = 45u32;
30743    const NAME: &'static str = "MISSION_CLEAR_ALL";
30744    const EXTRA_CRC: u8 = 232u8;
30745    const ENCODED_LEN: usize = 3usize;
30746    fn deser(
30747        _version: MavlinkVersion,
30748        __input: &[u8],
30749    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30750        let avail_len = __input.len();
30751        let mut payload_buf = [0; Self::ENCODED_LEN];
30752        let mut buf = if avail_len < Self::ENCODED_LEN {
30753            payload_buf[0..avail_len].copy_from_slice(__input);
30754            Bytes::new(&payload_buf)
30755        } else {
30756            Bytes::new(__input)
30757        };
30758        let mut __struct = Self::default();
30759        __struct.target_system = buf.get_u8();
30760        __struct.target_component = buf.get_u8();
30761        let tmp = buf.get_u8();
30762        __struct.mission_type =
30763            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30764                enum_type: "MavMissionType",
30765                value: tmp as u32,
30766            })?;
30767        Ok(__struct)
30768    }
30769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30770        let mut __tmp = BytesMut::new(bytes);
30771        #[allow(clippy::absurd_extreme_comparisons)]
30772        #[allow(unused_comparisons)]
30773        if __tmp.remaining() < Self::ENCODED_LEN {
30774            panic!(
30775                "buffer is too small (need {} bytes, but got {})",
30776                Self::ENCODED_LEN,
30777                __tmp.remaining(),
30778            )
30779        }
30780        __tmp.put_u8(self.target_system);
30781        __tmp.put_u8(self.target_component);
30782        __tmp.put_u8(self.mission_type as u8);
30783        if matches!(version, MavlinkVersion::V2) {
30784            let len = __tmp.len();
30785            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30786        } else {
30787            __tmp.len()
30788        }
30789    }
30790}
30791#[doc = "id: 373"]
30792#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
30793#[derive(Debug, Clone, PartialEq)]
30794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30796pub struct GENERATOR_STATUS_DATA {
30797    #[doc = "Status flags."]
30798    pub status: MavGeneratorStatusFlag,
30799    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
30800    pub battery_current: f32,
30801    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
30802    pub load_current: f32,
30803    #[doc = "The power being generated. NaN: field not provided"]
30804    pub power_generated: f32,
30805    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
30806    pub bus_voltage: f32,
30807    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
30808    pub bat_current_setpoint: f32,
30809    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
30810    pub runtime: u32,
30811    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
30812    pub time_until_maintenance: i32,
30813    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
30814    pub generator_speed: u16,
30815    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
30816    pub rectifier_temperature: i16,
30817    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
30818    pub generator_temperature: i16,
30819}
30820impl GENERATOR_STATUS_DATA {
30821    pub const ENCODED_LEN: usize = 42usize;
30822    pub const DEFAULT: Self = Self {
30823        status: MavGeneratorStatusFlag::DEFAULT,
30824        battery_current: 0.0_f32,
30825        load_current: 0.0_f32,
30826        power_generated: 0.0_f32,
30827        bus_voltage: 0.0_f32,
30828        bat_current_setpoint: 0.0_f32,
30829        runtime: 0_u32,
30830        time_until_maintenance: 0_i32,
30831        generator_speed: 0_u16,
30832        rectifier_temperature: 0_i16,
30833        generator_temperature: 0_i16,
30834    };
30835    #[cfg(feature = "arbitrary")]
30836    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30837        use arbitrary::{Arbitrary, Unstructured};
30838        let mut buf = [0u8; 1024];
30839        rng.fill_bytes(&mut buf);
30840        let mut unstructured = Unstructured::new(&buf);
30841        Self::arbitrary(&mut unstructured).unwrap_or_default()
30842    }
30843}
30844impl Default for GENERATOR_STATUS_DATA {
30845    fn default() -> Self {
30846        Self::DEFAULT.clone()
30847    }
30848}
30849impl MessageData for GENERATOR_STATUS_DATA {
30850    type Message = MavMessage;
30851    const ID: u32 = 373u32;
30852    const NAME: &'static str = "GENERATOR_STATUS";
30853    const EXTRA_CRC: u8 = 117u8;
30854    const ENCODED_LEN: usize = 42usize;
30855    fn deser(
30856        _version: MavlinkVersion,
30857        __input: &[u8],
30858    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30859        let avail_len = __input.len();
30860        let mut payload_buf = [0; Self::ENCODED_LEN];
30861        let mut buf = if avail_len < Self::ENCODED_LEN {
30862            payload_buf[0..avail_len].copy_from_slice(__input);
30863            Bytes::new(&payload_buf)
30864        } else {
30865            Bytes::new(__input)
30866        };
30867        let mut __struct = Self::default();
30868        let tmp = buf.get_u64_le();
30869        __struct.status = MavGeneratorStatusFlag::from_bits(
30870            tmp & MavGeneratorStatusFlag::all().bits(),
30871        )
30872        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30873            flag_type: "MavGeneratorStatusFlag",
30874            value: tmp as u32,
30875        })?;
30876        __struct.battery_current = buf.get_f32_le();
30877        __struct.load_current = buf.get_f32_le();
30878        __struct.power_generated = buf.get_f32_le();
30879        __struct.bus_voltage = buf.get_f32_le();
30880        __struct.bat_current_setpoint = buf.get_f32_le();
30881        __struct.runtime = buf.get_u32_le();
30882        __struct.time_until_maintenance = buf.get_i32_le();
30883        __struct.generator_speed = buf.get_u16_le();
30884        __struct.rectifier_temperature = buf.get_i16_le();
30885        __struct.generator_temperature = buf.get_i16_le();
30886        Ok(__struct)
30887    }
30888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30889        let mut __tmp = BytesMut::new(bytes);
30890        #[allow(clippy::absurd_extreme_comparisons)]
30891        #[allow(unused_comparisons)]
30892        if __tmp.remaining() < Self::ENCODED_LEN {
30893            panic!(
30894                "buffer is too small (need {} bytes, but got {})",
30895                Self::ENCODED_LEN,
30896                __tmp.remaining(),
30897            )
30898        }
30899        __tmp.put_u64_le(self.status.bits());
30900        __tmp.put_f32_le(self.battery_current);
30901        __tmp.put_f32_le(self.load_current);
30902        __tmp.put_f32_le(self.power_generated);
30903        __tmp.put_f32_le(self.bus_voltage);
30904        __tmp.put_f32_le(self.bat_current_setpoint);
30905        __tmp.put_u32_le(self.runtime);
30906        __tmp.put_i32_le(self.time_until_maintenance);
30907        __tmp.put_u16_le(self.generator_speed);
30908        __tmp.put_i16_le(self.rectifier_temperature);
30909        __tmp.put_i16_le(self.generator_temperature);
30910        if matches!(version, MavlinkVersion::V2) {
30911            let len = __tmp.len();
30912            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30913        } else {
30914            __tmp.len()
30915        }
30916    }
30917}
30918#[derive(Clone, PartialEq, Debug)]
30919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30920#[cfg_attr(feature = "serde", serde(tag = "type"))]
30921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30922#[repr(u32)]
30923pub enum MavMessage {
30924    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
30925    CANFD_FRAME(CANFD_FRAME_DATA),
30926    MEMORY_VECT(MEMORY_VECT_DATA),
30927    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
30928    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
30929    HIL_GPS(HIL_GPS_DATA),
30930    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
30931    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
30932    HEARTBEAT(HEARTBEAT_DATA),
30933    COMMAND_INT(COMMAND_INT_DATA),
30934    REQUEST_EVENT(REQUEST_EVENT_DATA),
30935    HOME_POSITION(HOME_POSITION_DATA),
30936    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
30937    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
30938    STATUSTEXT(STATUSTEXT_DATA),
30939    ATTITUDE(ATTITUDE_DATA),
30940    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
30941    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
30942    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
30943    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
30944    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
30945    SIM_STATE(SIM_STATE_DATA),
30946    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
30947    SYSTEM_TIME(SYSTEM_TIME_DATA),
30948    ESC_STATUS(ESC_STATUS_DATA),
30949    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
30950    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
30951    RC_CHANNELS(RC_CHANNELS_DATA),
30952    MISSION_REQUEST(MISSION_REQUEST_DATA),
30953    GPS2_RAW(GPS2_RAW_DATA),
30954    GPS2_RTK(GPS2_RTK_DATA),
30955    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
30956    LOGGING_ACK(LOGGING_ACK_DATA),
30957    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
30958    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
30959    BATTERY_STATUS(BATTERY_STATUS_DATA),
30960    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
30961    CAN_FRAME(CAN_FRAME_DATA),
30962    V2_EXTENSION(V2_EXTENSION_DATA),
30963    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
30964    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
30965    LOG_ERASE(LOG_ERASE_DATA),
30966    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
30967    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
30968    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
30969    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
30970    VFR_HUD(VFR_HUD_DATA),
30971    PARAM_VALUE(PARAM_VALUE_DATA),
30972    GPS_RTK(GPS_RTK_DATA),
30973    COMMAND_ACK(COMMAND_ACK_DATA),
30974    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
30975    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
30976    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
30977    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
30978    GPS_STATUS(GPS_STATUS_DATA),
30979    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
30980    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
30981    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
30982    DEBUG_VECT(DEBUG_VECT_DATA),
30983    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
30984    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
30985    MISSION_CURRENT(MISSION_CURRENT_DATA),
30986    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
30987    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
30988    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
30989    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
30990    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
30991    SET_MODE(SET_MODE_DATA),
30992    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
30993    MISSION_COUNT(MISSION_COUNT_DATA),
30994    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
30995    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
30996    ALTITUDE(ALTITUDE_DATA),
30997    EVENT(EVENT_DATA),
30998    DATA_STREAM(DATA_STREAM_DATA),
30999    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
31000    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
31001    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
31002    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
31003    RADIO_STATUS(RADIO_STATUS_DATA),
31004    SCALED_IMU2(SCALED_IMU2_DATA),
31005    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
31006    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
31007    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
31008    POWER_STATUS(POWER_STATUS_DATA),
31009    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
31010    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
31011    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
31012    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
31013    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
31014    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
31015    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
31016    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
31017    PLAY_TUNE(PLAY_TUNE_DATA),
31018    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
31019    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
31020    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
31021    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
31022    RAW_RPM(RAW_RPM_DATA),
31023    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
31024    RAW_IMU(RAW_IMU_DATA),
31025    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
31026    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
31027    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
31028    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
31029    TERRAIN_DATA(TERRAIN_DATA_DATA),
31030    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
31031    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
31032    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
31033    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
31034    MISSION_ITEM(MISSION_ITEM_DATA),
31035    CURRENT_MODE(CURRENT_MODE_DATA),
31036    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
31037    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
31038    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
31039    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
31040    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
31041    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
31042    LANDING_TARGET(LANDING_TARGET_DATA),
31043    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
31044    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
31045    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
31046    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
31047    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
31048    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
31049    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
31050    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
31051    PING(PING_DATA),
31052    WINCH_STATUS(WINCH_STATUS_DATA),
31053    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
31054    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
31055    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
31056    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
31057    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
31058    RAW_PRESSURE(RAW_PRESSURE_DATA),
31059    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
31060    HIL_STATE(HIL_STATE_DATA),
31061    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
31062    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
31063    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
31064    DEBUG(DEBUG_DATA),
31065    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
31066    AIS_VESSEL(AIS_VESSEL_DATA),
31067    ODOMETRY(ODOMETRY_DATA),
31068    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
31069    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
31070    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
31071    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
31072    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
31073    COMMAND_LONG(COMMAND_LONG_DATA),
31074    GPS_INPUT(GPS_INPUT_DATA),
31075    SETUP_SIGNING(SETUP_SIGNING_DATA),
31076    LOGGING_DATA(LOGGING_DATA_DATA),
31077    COLLISION(COLLISION_DATA),
31078    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
31079    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
31080    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
31081    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
31082    LOG_ENTRY(LOG_ENTRY_DATA),
31083    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
31084    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
31085    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
31086    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
31087    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
31088    ESC_INFO(ESC_INFO_DATA),
31089    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
31090    WIND_COV(WIND_COV_DATA),
31091    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
31092    TIMESYNC(TIMESYNC_DATA),
31093    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
31094    LOG_DATA(LOG_DATA_DATA),
31095    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
31096    GPS_RAW_INT(GPS_RAW_INT_DATA),
31097    AUTH_KEY(AUTH_KEY_DATA),
31098    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
31099    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
31100    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
31101    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
31102    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
31103    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
31104    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
31105    TUNNEL(TUNNEL_DATA),
31106    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
31107    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
31108    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
31109    HIL_CONTROLS(HIL_CONTROLS_DATA),
31110    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
31111    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
31112    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
31113    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
31114    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
31115    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
31116    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
31117    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
31118    PARAM_SET(PARAM_SET_DATA),
31119    SCALED_IMU(SCALED_IMU_DATA),
31120    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
31121    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
31122    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
31123    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
31124    HIGHRES_IMU(HIGHRES_IMU_DATA),
31125    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
31126    EFI_STATUS(EFI_STATUS_DATA),
31127    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
31128    VIBRATION(VIBRATION_DATA),
31129    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
31130    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
31131    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
31132    SYS_STATUS(SYS_STATUS_DATA),
31133    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
31134    FUEL_STATUS(FUEL_STATUS_DATA),
31135    MISSION_ACK(MISSION_ACK_DATA),
31136    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
31137    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
31138    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
31139    FENCE_STATUS(FENCE_STATUS_DATA),
31140    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
31141    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
31142    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
31143    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
31144    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
31145    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
31146    HIGH_LATENCY(HIGH_LATENCY_DATA),
31147    SCALED_IMU3(SCALED_IMU3_DATA),
31148    HIL_SENSOR(HIL_SENSOR_DATA),
31149    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
31150    BATTERY_INFO(BATTERY_INFO_DATA),
31151    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
31152    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
31153}
31154impl MavMessage {
31155    pub const fn all_ids() -> &'static [u32] {
31156        &[
31157            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
31158            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
31159            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
31160            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
31161            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
31162            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
31163            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
31164            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
31165            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
31166            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
31167            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
31168            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
31169            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
31170            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
31171            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
31172            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
31173            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
31174            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
31175            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
31176            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
31177            12915u32, 12918u32, 12919u32, 12920u32,
31178        ]
31179    }
31180}
31181impl Message for MavMessage {
31182    fn parse(
31183        version: MavlinkVersion,
31184        id: u32,
31185        payload: &[u8],
31186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31187        match id {
31188            HIL_ACTUATOR_CONTROLS_DATA::ID => {
31189                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
31190            }
31191            CANFD_FRAME_DATA::ID => {
31192                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
31193            }
31194            MEMORY_VECT_DATA::ID => {
31195                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
31196            }
31197            MAG_CAL_REPORT_DATA::ID => {
31198                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
31199            }
31200            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
31201                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
31202                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
31203            }
31204            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
31205            CELLULAR_CONFIG_DATA::ID => {
31206                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
31207            }
31208            CAMERA_FOV_STATUS_DATA::ID => {
31209                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
31210            }
31211            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
31212            COMMAND_INT_DATA::ID => {
31213                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
31214            }
31215            REQUEST_EVENT_DATA::ID => {
31216                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
31217            }
31218            HOME_POSITION_DATA::ID => {
31219                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
31220            }
31221            ACTUATOR_CONTROL_TARGET_DATA::ID => {
31222                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
31223                    .map(Self::ACTUATOR_CONTROL_TARGET)
31224            }
31225            AVAILABLE_MODES_MONITOR_DATA::ID => {
31226                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
31227                    .map(Self::AVAILABLE_MODES_MONITOR)
31228            }
31229            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
31230            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
31231            POSITION_TARGET_LOCAL_NED_DATA::ID => {
31232                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
31233                    .map(Self::POSITION_TARGET_LOCAL_NED)
31234            }
31235            HIGH_LATENCY2_DATA::ID => {
31236                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
31237            }
31238            MISSION_REQUEST_LIST_DATA::ID => {
31239                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
31240            }
31241            NAMED_VALUE_FLOAT_DATA::ID => {
31242                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
31243            }
31244            VISION_POSITION_ESTIMATE_DATA::ID => {
31245                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
31246                    .map(Self::VISION_POSITION_ESTIMATE)
31247            }
31248            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
31249            VIDEO_STREAM_STATUS_DATA::ID => {
31250                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
31251            }
31252            SYSTEM_TIME_DATA::ID => {
31253                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
31254            }
31255            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
31256            CAMERA_IMAGE_CAPTURED_DATA::ID => {
31257                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
31258            }
31259            SET_ATTITUDE_TARGET_DATA::ID => {
31260                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
31261            }
31262            RC_CHANNELS_DATA::ID => {
31263                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
31264            }
31265            MISSION_REQUEST_DATA::ID => {
31266                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
31267            }
31268            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
31269            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
31270            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
31271                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
31272                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
31273            }
31274            LOGGING_ACK_DATA::ID => {
31275                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
31276            }
31277            PARAM_EXT_VALUE_DATA::ID => {
31278                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
31279            }
31280            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
31281                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
31282                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
31283            }
31284            BATTERY_STATUS_DATA::ID => {
31285                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
31286            }
31287            MISSION_ITEM_REACHED_DATA::ID => {
31288                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
31289            }
31290            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
31291            V2_EXTENSION_DATA::ID => {
31292                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
31293            }
31294            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
31295                .map(Self::CURRENT_EVENT_SEQUENCE),
31296            RESPONSE_EVENT_ERROR_DATA::ID => {
31297                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
31298            }
31299            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
31300            ILLUMINATOR_STATUS_DATA::ID => {
31301                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
31302            }
31303            GPS_INJECT_DATA_DATA::ID => {
31304                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
31305            }
31306            NAMED_VALUE_INT_DATA::ID => {
31307                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
31308            }
31309            HYGROMETER_SENSOR_DATA::ID => {
31310                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
31311            }
31312            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
31313            PARAM_VALUE_DATA::ID => {
31314                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
31315            }
31316            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
31317            COMMAND_ACK_DATA::ID => {
31318                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
31319            }
31320            HIL_RC_INPUTS_RAW_DATA::ID => {
31321                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
31322            }
31323            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
31324                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
31325                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
31326            }
31327            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
31328                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
31329            }
31330            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
31331                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
31332                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
31333            }
31334            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
31335            VIDEO_STREAM_INFORMATION_DATA::ID => {
31336                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
31337                    .map(Self::VIDEO_STREAM_INFORMATION)
31338            }
31339            MISSION_REQUEST_INT_DATA::ID => {
31340                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
31341            }
31342            ATTITUDE_QUATERNION_COV_DATA::ID => {
31343                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
31344                    .map(Self::ATTITUDE_QUATERNION_COV)
31345            }
31346            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
31347            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
31348                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
31349                    .map(Self::GIMBAL_DEVICE_INFORMATION)
31350            }
31351            COMPONENT_METADATA_DATA::ID => {
31352                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
31353            }
31354            MISSION_CURRENT_DATA::ID => {
31355                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
31356            }
31357            MOUNT_ORIENTATION_DATA::ID => {
31358                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
31359            }
31360            SCALED_PRESSURE2_DATA::ID => {
31361                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
31362            }
31363            LOGGING_DATA_ACKED_DATA::ID => {
31364                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
31365            }
31366            COMMAND_CANCEL_DATA::ID => {
31367                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
31368            }
31369            CHANGE_OPERATOR_CONTROL_DATA::ID => {
31370                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
31371                    .map(Self::CHANGE_OPERATOR_CONTROL)
31372            }
31373            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
31374            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
31375                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
31376                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
31377            }
31378            MISSION_COUNT_DATA::ID => {
31379                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
31380            }
31381            ADSB_VEHICLE_DATA::ID => {
31382                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
31383            }
31384            NAV_CONTROLLER_OUTPUT_DATA::ID => {
31385                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
31386            }
31387            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
31388            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
31389            DATA_STREAM_DATA::ID => {
31390                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
31391            }
31392            PARAM_EXT_ACK_DATA::ID => {
31393                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
31394            }
31395            UAVCAN_NODE_INFO_DATA::ID => {
31396                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
31397            }
31398            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
31399                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
31400                    .map(Self::GIMBAL_MANAGER_INFORMATION)
31401            }
31402            EXTENDED_SYS_STATE_DATA::ID => {
31403                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
31404            }
31405            RADIO_STATUS_DATA::ID => {
31406                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
31407            }
31408            SCALED_IMU2_DATA::ID => {
31409                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
31410            }
31411            SCALED_PRESSURE3_DATA::ID => {
31412                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
31413            }
31414            SMART_BATTERY_INFO_DATA::ID => {
31415                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
31416            }
31417            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
31418                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
31419                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
31420            }
31421            POWER_STATUS_DATA::ID => {
31422                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
31423            }
31424            RC_CHANNELS_SCALED_DATA::ID => {
31425                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
31426            }
31427            CAMERA_INFORMATION_DATA::ID => {
31428                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
31429            }
31430            UTM_GLOBAL_POSITION_DATA::ID => {
31431                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
31432            }
31433            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
31434                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
31435                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
31436            }
31437            FOLLOW_TARGET_DATA::ID => {
31438                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
31439            }
31440            CAMERA_CAPTURE_STATUS_DATA::ID => {
31441                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
31442            }
31443            MANUAL_CONTROL_DATA::ID => {
31444                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
31445            }
31446            ONBOARD_COMPUTER_STATUS_DATA::ID => {
31447                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
31448                    .map(Self::ONBOARD_COMPUTER_STATUS)
31449            }
31450            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
31451            LOCAL_POSITION_NED_DATA::ID => {
31452                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
31453            }
31454            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
31455                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
31456                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
31457            }
31458            REQUEST_DATA_STREAM_DATA::ID => {
31459                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
31460            }
31461            PLAY_TUNE_V2_DATA::ID => {
31462                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
31463            }
31464            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
31465            CAMERA_TRIGGER_DATA::ID => {
31466                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
31467            }
31468            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
31469            COMPONENT_INFORMATION_BASIC_DATA::ID => {
31470                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
31471                    .map(Self::COMPONENT_INFORMATION_BASIC)
31472            }
31473            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
31474                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
31475                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
31476            }
31477            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
31478                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
31479                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
31480            }
31481            HIL_STATE_QUATERNION_DATA::ID => {
31482                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
31483            }
31484            TERRAIN_DATA_DATA::ID => {
31485                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
31486            }
31487            SUPPORTED_TUNES_DATA::ID => {
31488                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
31489            }
31490            ENCAPSULATED_DATA_DATA::ID => {
31491                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
31492            }
31493            DISTANCE_SENSOR_DATA::ID => {
31494                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
31495            }
31496            AUTOPILOT_VERSION_DATA::ID => {
31497                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
31498            }
31499            MISSION_ITEM_DATA::ID => {
31500                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
31501            }
31502            CURRENT_MODE_DATA::ID => {
31503                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
31504            }
31505            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
31506                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
31507            }
31508            GPS_RTCM_DATA_DATA::ID => {
31509                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
31510            }
31511            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
31512                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
31513                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
31514            }
31515            GIMBAL_MANAGER_STATUS_DATA::ID => {
31516                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
31517            }
31518            RC_CHANNELS_RAW_DATA::ID => {
31519                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
31520            }
31521            AVAILABLE_MODES_DATA::ID => {
31522                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
31523            }
31524            LANDING_TARGET_DATA::ID => {
31525                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
31526            }
31527            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
31528                .map(Self::PARAM_EXT_REQUEST_LIST),
31529            VISION_SPEED_ESTIMATE_DATA::ID => {
31530                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
31531            }
31532            WIFI_CONFIG_AP_DATA::ID => {
31533                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
31534            }
31535            VICON_POSITION_ESTIMATE_DATA::ID => {
31536                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
31537                    .map(Self::VICON_POSITION_ESTIMATE)
31538            }
31539            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
31540                .map(Self::OPEN_DRONE_ID_LOCATION),
31541            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
31542                .map(Self::ACTUATOR_OUTPUT_STATUS),
31543            CAN_FILTER_MODIFY_DATA::ID => {
31544                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
31545            }
31546            ATT_POS_MOCAP_DATA::ID => {
31547                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
31548            }
31549            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
31550            WINCH_STATUS_DATA::ID => {
31551                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
31552            }
31553            FLIGHT_INFORMATION_DATA::ID => {
31554                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
31555            }
31556            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
31557                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
31558                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
31559            }
31560            MISSION_ITEM_INT_DATA::ID => {
31561                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
31562            }
31563            ATTITUDE_QUATERNION_DATA::ID => {
31564                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
31565            }
31566            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
31567                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
31568                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
31569            }
31570            RAW_PRESSURE_DATA::ID => {
31571                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
31572            }
31573            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
31574                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
31575                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
31576            }
31577            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
31578            PARAM_EXT_SET_DATA::ID => {
31579                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
31580            }
31581            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
31582                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
31583                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
31584            }
31585            SCALED_PRESSURE_DATA::ID => {
31586                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
31587            }
31588            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
31589            DEBUG_FLOAT_ARRAY_DATA::ID => {
31590                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
31591            }
31592            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
31593            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
31594            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
31595                .map(Self::FILE_TRANSFER_PROTOCOL),
31596            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
31597                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
31598                    .map(Self::POSITION_TARGET_GLOBAL_INT)
31599            }
31600            SET_HOME_POSITION_DATA::ID => {
31601                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
31602            }
31603            PARAM_MAP_RC_DATA::ID => {
31604                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
31605            }
31606            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
31607                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
31608                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
31609            }
31610            COMMAND_LONG_DATA::ID => {
31611                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
31612            }
31613            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
31614            SETUP_SIGNING_DATA::ID => {
31615                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
31616            }
31617            LOGGING_DATA_DATA::ID => {
31618                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
31619            }
31620            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
31621            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
31622                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
31623                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
31624            }
31625            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
31626                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
31627                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
31628            }
31629            LINK_NODE_STATUS_DATA::ID => {
31630                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
31631            }
31632            OPTICAL_FLOW_RAD_DATA::ID => {
31633                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
31634            }
31635            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
31636            CELLULAR_STATUS_DATA::ID => {
31637                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
31638            }
31639            STORAGE_INFORMATION_DATA::ID => {
31640                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
31641            }
31642            TERRAIN_REQUEST_DATA::ID => {
31643                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
31644            }
31645            MISSION_SET_CURRENT_DATA::ID => {
31646                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
31647            }
31648            LOG_REQUEST_LIST_DATA::ID => {
31649                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
31650            }
31651            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
31652            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
31653                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
31654                    .map(Self::SAFETY_SET_ALLOWED_AREA)
31655            }
31656            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
31657            ATTITUDE_TARGET_DATA::ID => {
31658                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
31659            }
31660            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
31661            SERIAL_CONTROL_DATA::ID => {
31662                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
31663            }
31664            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
31665            SAFETY_ALLOWED_AREA_DATA::ID => {
31666                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
31667            }
31668            GPS_RAW_INT_DATA::ID => {
31669                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
31670            }
31671            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
31672            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
31673                .map(Self::LOCAL_POSITION_NED_COV),
31674            LOG_REQUEST_DATA_DATA::ID => {
31675                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
31676            }
31677            COMPONENT_INFORMATION_DATA::ID => {
31678                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
31679            }
31680            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
31681                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
31682                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
31683            }
31684            ESTIMATOR_STATUS_DATA::ID => {
31685                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
31686            }
31687            RC_CHANNELS_OVERRIDE_DATA::ID => {
31688                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
31689            }
31690            CAMERA_SETTINGS_DATA::ID => {
31691                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
31692            }
31693            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
31694            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
31695                .map(Self::OPEN_DRONE_ID_BASIC_ID),
31696            WHEEL_DISTANCE_DATA::ID => {
31697                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
31698            }
31699            OBSTACLE_DISTANCE_DATA::ID => {
31700                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
31701            }
31702            HIL_CONTROLS_DATA::ID => {
31703                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
31704            }
31705            UAVCAN_NODE_STATUS_DATA::ID => {
31706                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
31707            }
31708            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
31709                .map(Self::ORBIT_EXECUTION_STATUS),
31710            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
31711                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
31712            }
31713            GPS_GLOBAL_ORIGIN_DATA::ID => {
31714                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
31715            }
31716            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
31717                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
31718                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
31719            }
31720            HIL_OPTICAL_FLOW_DATA::ID => {
31721                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
31722            }
31723            PARAM_REQUEST_LIST_DATA::ID => {
31724                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
31725            }
31726            ISBD_LINK_STATUS_DATA::ID => {
31727                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
31728            }
31729            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
31730            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
31731            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
31732                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
31733                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
31734            }
31735            TERRAIN_REPORT_DATA::ID => {
31736                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
31737            }
31738            MESSAGE_INTERVAL_DATA::ID => {
31739                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
31740            }
31741            SERVO_OUTPUT_RAW_DATA::ID => {
31742                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
31743            }
31744            HIGHRES_IMU_DATA::ID => {
31745                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
31746            }
31747            LOG_REQUEST_END_DATA::ID => {
31748                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
31749            }
31750            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
31751            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
31752                .map(Self::PARAM_EXT_REQUEST_READ),
31753            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
31754            CONTROL_SYSTEM_STATE_DATA::ID => {
31755                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
31756            }
31757            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
31758                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
31759                    .map(Self::TIME_ESTIMATE_TO_TARGET)
31760            }
31761            PROTOCOL_VERSION_DATA::ID => {
31762                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
31763            }
31764            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
31765            BUTTON_CHANGE_DATA::ID => {
31766                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
31767            }
31768            FUEL_STATUS_DATA::ID => {
31769                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
31770            }
31771            MISSION_ACK_DATA::ID => {
31772                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
31773            }
31774            RESOURCE_REQUEST_DATA::ID => {
31775                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
31776            }
31777            CAMERA_THERMAL_RANGE_DATA::ID => {
31778                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
31779            }
31780            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
31781                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
31782                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
31783            }
31784            FENCE_STATUS_DATA::ID => {
31785                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
31786            }
31787            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
31788                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
31789                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
31790            }
31791            GLOBAL_POSITION_INT_DATA::ID => {
31792                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
31793            }
31794            MANUAL_SETPOINT_DATA::ID => {
31795                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
31796            }
31797            TERRAIN_CHECK_DATA::ID => {
31798                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
31799            }
31800            GLOBAL_POSITION_INT_COV_DATA::ID => {
31801                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
31802                    .map(Self::GLOBAL_POSITION_INT_COV)
31803            }
31804            PARAM_REQUEST_READ_DATA::ID => {
31805                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
31806            }
31807            HIGH_LATENCY_DATA::ID => {
31808                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
31809            }
31810            SCALED_IMU3_DATA::ID => {
31811                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
31812            }
31813            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
31814            OPTICAL_FLOW_DATA::ID => {
31815                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
31816            }
31817            BATTERY_INFO_DATA::ID => {
31818                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
31819            }
31820            MISSION_CLEAR_ALL_DATA::ID => {
31821                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
31822            }
31823            GENERATOR_STATUS_DATA::ID => {
31824                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
31825            }
31826            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
31827        }
31828    }
31829    fn message_name(&self) -> &'static str {
31830        match self {
31831            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
31832            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
31833            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
31834            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
31835            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
31836                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
31837            }
31838            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
31839            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
31840            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
31841            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
31842            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
31843            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
31844            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
31845            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
31846            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
31847            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
31848            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
31849            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
31850            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
31851            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
31852            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
31853            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
31854            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
31855            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
31856            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
31857            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
31858            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
31859            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
31860            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
31861            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
31862            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
31863            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
31864            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
31865            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
31866            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
31867            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
31868            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
31869            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
31870            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
31871            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
31872            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
31873            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
31874            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
31875            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
31876            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
31877            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
31878            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
31879            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
31880            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
31881            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
31882            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
31883            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
31884            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
31885            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
31886            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
31887            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
31888            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
31889            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
31890            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
31891            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
31892            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
31893            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
31894            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
31895            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
31896            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
31897            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
31898            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
31899            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
31900            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
31901            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
31902                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
31903            }
31904            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
31905            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
31906            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
31907            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
31908            Self::EVENT(..) => EVENT_DATA::NAME,
31909            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
31910            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
31911            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
31912            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
31913            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
31914            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
31915            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
31916            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
31917            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
31918            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
31919            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
31920            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
31921            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
31922            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
31923            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
31924                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
31925            }
31926            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
31927            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
31928            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
31929            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
31930            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
31931            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
31932            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
31933            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
31934            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
31935            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
31936            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
31937            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
31938            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
31939            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
31940            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
31941            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
31942            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
31943            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
31944            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
31945            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
31946            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
31947            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
31948            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
31949            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
31950            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
31951            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
31952            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
31953            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
31954            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
31955            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
31956            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
31957            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
31958            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
31959            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
31960            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
31961            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
31962            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
31963            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
31964            Self::PING(..) => PING_DATA::NAME,
31965            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
31966            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
31967            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
31968            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
31969            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
31970            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
31971            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
31972            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
31973            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
31974            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
31975            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
31976                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
31977            }
31978            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
31979            Self::DEBUG(..) => DEBUG_DATA::NAME,
31980            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
31981            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
31982            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
31983            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
31984            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
31985            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
31986            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
31987            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
31988            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
31989            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
31990            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
31991            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
31992            Self::COLLISION(..) => COLLISION_DATA::NAME,
31993            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
31994            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
31995                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
31996            }
31997            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
31998            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
31999            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
32000            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
32001            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
32002            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
32003            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
32004            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
32005            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
32006            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
32007            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
32008            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
32009            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
32010            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
32011            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
32012            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
32013            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
32014            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
32015            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
32016            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
32017            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
32018            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
32019            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
32020            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
32021            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
32022            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
32023            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
32024            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
32025            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
32026            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
32027            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
32028            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
32029            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
32030            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
32031            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
32032            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
32033            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
32034            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
32035            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
32036            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
32037            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
32038            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
32039            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
32040            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
32041            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
32042            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
32043            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
32044            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
32045            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
32046            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
32047            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
32048            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
32049            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
32050            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
32051            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
32052            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
32053            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
32054            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
32055            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
32056            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
32057            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
32058            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
32059            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
32060            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
32061            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
32062            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
32063            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
32064            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
32065            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
32066            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
32067            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
32068            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
32069            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
32070        }
32071    }
32072    fn message_id(&self) -> u32 {
32073        match self {
32074            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
32075            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
32076            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
32077            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
32078            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
32079            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
32080            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
32081            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
32082            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
32083            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
32084            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
32085            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
32086            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
32087            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
32088            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
32089            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
32090            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
32091            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
32092            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
32093            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
32094            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
32095            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
32096            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
32097            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
32098            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
32099            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
32100            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
32101            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
32102            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
32103            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
32104            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
32105            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
32106            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
32107            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
32108            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
32109            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
32110            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
32111            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
32112            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
32113            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
32114            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
32115            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
32116            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
32117            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
32118            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
32119            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
32120            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
32121            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
32122            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
32123            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
32124            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
32125            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
32126            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
32127            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
32128            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
32129            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
32130            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
32131            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
32132            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
32133            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
32134            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
32135            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
32136            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
32137            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
32138            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
32139            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
32140            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
32141            Self::SET_MODE(..) => SET_MODE_DATA::ID,
32142            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32143                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
32144            }
32145            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
32146            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
32147            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
32148            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
32149            Self::EVENT(..) => EVENT_DATA::ID,
32150            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
32151            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
32152            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
32153            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
32154            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
32155            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
32156            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
32157            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
32158            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
32159            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
32160            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
32161            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
32162            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
32163            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
32164            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32165                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
32166            }
32167            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
32168            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
32169            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
32170            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
32171            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
32172            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
32173            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
32174            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
32175            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
32176            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
32177            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
32178            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
32179            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
32180            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
32181            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
32182            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
32183            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
32184            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
32185            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
32186            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
32187            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
32188            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
32189            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
32190            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
32191            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
32192            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
32193            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
32194            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
32195            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
32196            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
32197            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
32198            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
32199            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
32200            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
32201            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
32202            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
32203            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
32204            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
32205            Self::PING(..) => PING_DATA::ID,
32206            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
32207            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
32208            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
32209            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
32210            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
32211            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
32212            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
32213            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
32214            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
32215            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
32216            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32217                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
32218            }
32219            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
32220            Self::DEBUG(..) => DEBUG_DATA::ID,
32221            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
32222            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
32223            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
32224            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
32225            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
32226            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
32227            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
32228            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
32229            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
32230            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
32231            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
32232            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
32233            Self::COLLISION(..) => COLLISION_DATA::ID,
32234            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
32235            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32236                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
32237            }
32238            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
32239            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
32240            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
32241            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
32242            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
32243            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
32244            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
32245            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
32246            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
32247            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
32248            Self::WIND_COV(..) => WIND_COV_DATA::ID,
32249            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
32250            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
32251            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
32252            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
32253            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
32254            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
32255            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
32256            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
32257            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
32258            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
32259            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
32260            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
32261            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
32262            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
32263            Self::TUNNEL(..) => TUNNEL_DATA::ID,
32264            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
32265            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
32266            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
32267            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
32268            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
32269            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
32270            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
32271            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
32272            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
32273            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
32274            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
32275            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
32276            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
32277            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
32278            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
32279            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
32280            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
32281            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
32282            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
32283            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
32284            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
32285            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
32286            Self::VIBRATION(..) => VIBRATION_DATA::ID,
32287            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
32288            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
32289            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
32290            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
32291            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
32292            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
32293            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
32294            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
32295            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
32296            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
32297            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
32298            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
32299            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
32300            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
32301            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
32302            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
32303            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
32304            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
32305            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
32306            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
32307            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
32308            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
32309            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
32310            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
32311        }
32312    }
32313    fn message_id_from_name(name: &str) -> Option<u32> {
32314        match name {
32315            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
32316            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
32317            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
32318            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
32319            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
32320                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
32321            }
32322            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
32323            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
32324            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
32325            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
32326            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
32327            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
32328            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
32329            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
32330            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
32331            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
32332            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
32333            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
32334            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
32335            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
32336            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
32337            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
32338            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
32339            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
32340            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
32341            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
32342            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
32343            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
32344            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
32345            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
32346            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
32347            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
32348            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
32349                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
32350            }
32351            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
32352            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
32353            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
32354            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
32355            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
32356            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
32357            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
32358            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
32359            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
32360            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
32361            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
32362            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
32363            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
32364            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
32365            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
32366            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
32367            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
32368            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
32369            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
32370            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
32371            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
32372            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
32373                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
32374            }
32375            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
32376            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
32377            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
32378            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
32379            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
32380            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
32381            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
32382            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
32383            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
32384            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
32385            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
32386            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
32387            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
32388            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
32389            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
32390                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
32391            }
32392            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
32393            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
32394            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
32395            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
32396            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
32397            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
32398            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
32399            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
32400            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
32401            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
32402            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
32403            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
32404            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
32405            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
32406            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
32407            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
32408            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
32409            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
32410            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
32411            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
32412                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
32413            }
32414            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
32415            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
32416            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
32417            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
32418            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
32419            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
32420            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
32421            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
32422            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
32423            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
32424            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
32425            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
32426            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
32427            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
32428                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
32429            }
32430            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
32431                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
32432            }
32433            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
32434            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
32435            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
32436            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
32437            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
32438            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
32439            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
32440            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
32441            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
32442            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
32443            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
32444            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
32445            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
32446            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
32447            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
32448            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
32449            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
32450            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
32451            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
32452            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
32453            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
32454            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
32455            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
32456            PING_DATA::NAME => Some(PING_DATA::ID),
32457            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
32458            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
32459            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
32460            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
32461            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
32462            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
32463            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
32464            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
32465            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
32466            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
32467            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
32468                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
32469            }
32470            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
32471            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
32472            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
32473            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
32474            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
32475            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
32476            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
32477            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
32478            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
32479            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
32480            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
32481            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
32482            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
32483            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
32484            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
32485            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
32486            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
32487                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
32488            }
32489            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
32490            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
32491            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
32492            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
32493            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
32494            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
32495            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
32496            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
32497            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
32498            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
32499            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
32500            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
32501            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
32502            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
32503            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
32504            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
32505            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
32506            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
32507            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
32508            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
32509            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
32510            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
32511            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
32512            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
32513            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
32514            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
32515            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
32516            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
32517            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
32518            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
32519            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
32520            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
32521            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
32522            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
32523            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
32524            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
32525            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
32526            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
32527            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
32528            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
32529            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
32530            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
32531            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
32532            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
32533            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
32534            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
32535            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
32536            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
32537            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
32538            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
32539            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
32540            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
32541            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
32542            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
32543            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
32544            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
32545            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
32546            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
32547            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
32548            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
32549            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
32550            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
32551            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
32552            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
32553            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
32554            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
32555            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
32556            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
32557            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
32558            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
32559            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
32560            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
32561            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
32562            _ => None,
32563        }
32564    }
32565    fn default_message_from_id(id: u32) -> Option<Self> {
32566        match id {
32567            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
32568                HIL_ACTUATOR_CONTROLS_DATA::default(),
32569            )),
32570            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
32571            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
32572            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
32573            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
32574                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
32575                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
32576                ))
32577            }
32578            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
32579            CELLULAR_CONFIG_DATA::ID => {
32580                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
32581            }
32582            CAMERA_FOV_STATUS_DATA::ID => {
32583                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
32584            }
32585            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
32586            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
32587            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
32588            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
32589            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
32590                ACTUATOR_CONTROL_TARGET_DATA::default(),
32591            )),
32592            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
32593                AVAILABLE_MODES_MONITOR_DATA::default(),
32594            )),
32595            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
32596            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
32597            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
32598                POSITION_TARGET_LOCAL_NED_DATA::default(),
32599            )),
32600            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
32601            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
32602                MISSION_REQUEST_LIST_DATA::default(),
32603            )),
32604            NAMED_VALUE_FLOAT_DATA::ID => {
32605                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
32606            }
32607            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
32608                VISION_POSITION_ESTIMATE_DATA::default(),
32609            )),
32610            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
32611            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
32612                VIDEO_STREAM_STATUS_DATA::default(),
32613            )),
32614            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
32615            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
32616            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
32617                CAMERA_IMAGE_CAPTURED_DATA::default(),
32618            )),
32619            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
32620                SET_ATTITUDE_TARGET_DATA::default(),
32621            )),
32622            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
32623            MISSION_REQUEST_DATA::ID => {
32624                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
32625            }
32626            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
32627            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
32628            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
32629                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
32630            )),
32631            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
32632            PARAM_EXT_VALUE_DATA::ID => {
32633                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
32634            }
32635            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
32636                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
32637            )),
32638            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
32639            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
32640                MISSION_ITEM_REACHED_DATA::default(),
32641            )),
32642            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
32643            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
32644            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
32645                CURRENT_EVENT_SEQUENCE_DATA::default(),
32646            )),
32647            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
32648                RESPONSE_EVENT_ERROR_DATA::default(),
32649            )),
32650            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
32651            ILLUMINATOR_STATUS_DATA::ID => {
32652                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
32653            }
32654            GPS_INJECT_DATA_DATA::ID => {
32655                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
32656            }
32657            NAMED_VALUE_INT_DATA::ID => {
32658                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
32659            }
32660            HYGROMETER_SENSOR_DATA::ID => {
32661                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
32662            }
32663            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
32664            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
32665            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
32666            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
32667            HIL_RC_INPUTS_RAW_DATA::ID => {
32668                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
32669            }
32670            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
32671                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
32672            )),
32673            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
32674                OPEN_DRONE_ID_SELF_ID_DATA::default(),
32675            )),
32676            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
32677                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
32678                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
32679                ))
32680            }
32681            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
32682            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
32683                VIDEO_STREAM_INFORMATION_DATA::default(),
32684            )),
32685            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
32686                MISSION_REQUEST_INT_DATA::default(),
32687            )),
32688            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
32689                ATTITUDE_QUATERNION_COV_DATA::default(),
32690            )),
32691            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
32692            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
32693                GIMBAL_DEVICE_INFORMATION_DATA::default(),
32694            )),
32695            COMPONENT_METADATA_DATA::ID => {
32696                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
32697            }
32698            MISSION_CURRENT_DATA::ID => {
32699                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
32700            }
32701            MOUNT_ORIENTATION_DATA::ID => {
32702                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
32703            }
32704            SCALED_PRESSURE2_DATA::ID => {
32705                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
32706            }
32707            LOGGING_DATA_ACKED_DATA::ID => {
32708                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
32709            }
32710            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
32711            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
32712                CHANGE_OPERATOR_CONTROL_DATA::default(),
32713            )),
32714            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
32715            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
32716                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
32717                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
32718                ))
32719            }
32720            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
32721            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
32722            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
32723                NAV_CONTROLLER_OUTPUT_DATA::default(),
32724            )),
32725            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
32726            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
32727            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
32728            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
32729            UAVCAN_NODE_INFO_DATA::ID => {
32730                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
32731            }
32732            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
32733                GIMBAL_MANAGER_INFORMATION_DATA::default(),
32734            )),
32735            EXTENDED_SYS_STATE_DATA::ID => {
32736                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
32737            }
32738            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
32739            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
32740            SCALED_PRESSURE3_DATA::ID => {
32741                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
32742            }
32743            SMART_BATTERY_INFO_DATA::ID => {
32744                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
32745            }
32746            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
32747                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
32748            )),
32749            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
32750            RC_CHANNELS_SCALED_DATA::ID => {
32751                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
32752            }
32753            CAMERA_INFORMATION_DATA::ID => {
32754                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
32755            }
32756            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
32757                UTM_GLOBAL_POSITION_DATA::default(),
32758            )),
32759            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
32760                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
32761                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
32762                ))
32763            }
32764            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
32765            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
32766                CAMERA_CAPTURE_STATUS_DATA::default(),
32767            )),
32768            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
32769            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
32770                ONBOARD_COMPUTER_STATUS_DATA::default(),
32771            )),
32772            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
32773            LOCAL_POSITION_NED_DATA::ID => {
32774                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
32775            }
32776            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
32777                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
32778            )),
32779            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
32780                REQUEST_DATA_STREAM_DATA::default(),
32781            )),
32782            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
32783            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
32784            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
32785            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
32786            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
32787                COMPONENT_INFORMATION_BASIC_DATA::default(),
32788            )),
32789            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
32790                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
32791            )),
32792            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
32793                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
32794            )),
32795            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
32796                HIL_STATE_QUATERNION_DATA::default(),
32797            )),
32798            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
32799            SUPPORTED_TUNES_DATA::ID => {
32800                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
32801            }
32802            ENCAPSULATED_DATA_DATA::ID => {
32803                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
32804            }
32805            DISTANCE_SENSOR_DATA::ID => {
32806                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
32807            }
32808            AUTOPILOT_VERSION_DATA::ID => {
32809                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
32810            }
32811            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
32812            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
32813            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
32814                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
32815            )),
32816            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
32817            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
32818                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
32819            )),
32820            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
32821                GIMBAL_MANAGER_STATUS_DATA::default(),
32822            )),
32823            RC_CHANNELS_RAW_DATA::ID => {
32824                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
32825            }
32826            AVAILABLE_MODES_DATA::ID => {
32827                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
32828            }
32829            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
32830            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
32831                PARAM_EXT_REQUEST_LIST_DATA::default(),
32832            )),
32833            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
32834                VISION_SPEED_ESTIMATE_DATA::default(),
32835            )),
32836            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
32837            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
32838                VICON_POSITION_ESTIMATE_DATA::default(),
32839            )),
32840            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
32841                OPEN_DRONE_ID_LOCATION_DATA::default(),
32842            )),
32843            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
32844                ACTUATOR_OUTPUT_STATUS_DATA::default(),
32845            )),
32846            CAN_FILTER_MODIFY_DATA::ID => {
32847                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
32848            }
32849            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
32850            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
32851            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
32852            FLIGHT_INFORMATION_DATA::ID => {
32853                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
32854            }
32855            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
32856                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
32857            )),
32858            MISSION_ITEM_INT_DATA::ID => {
32859                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
32860            }
32861            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
32862                ATTITUDE_QUATERNION_DATA::default(),
32863            )),
32864            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
32865                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
32866            )),
32867            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
32868            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
32869                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
32870            )),
32871            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
32872            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
32873            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
32874                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
32875                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
32876                ))
32877            }
32878            SCALED_PRESSURE_DATA::ID => {
32879                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
32880            }
32881            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
32882            DEBUG_FLOAT_ARRAY_DATA::ID => {
32883                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
32884            }
32885            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
32886            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
32887            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
32888                FILE_TRANSFER_PROTOCOL_DATA::default(),
32889            )),
32890            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
32891                POSITION_TARGET_GLOBAL_INT_DATA::default(),
32892            )),
32893            SET_HOME_POSITION_DATA::ID => {
32894                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
32895            }
32896            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
32897            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
32898                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
32899            )),
32900            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
32901            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
32902            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
32903            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
32904            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
32905            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
32906                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
32907            )),
32908            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
32909                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
32910                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
32911                ))
32912            }
32913            LINK_NODE_STATUS_DATA::ID => {
32914                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
32915            }
32916            OPTICAL_FLOW_RAD_DATA::ID => {
32917                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
32918            }
32919            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
32920            CELLULAR_STATUS_DATA::ID => {
32921                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
32922            }
32923            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
32924                STORAGE_INFORMATION_DATA::default(),
32925            )),
32926            TERRAIN_REQUEST_DATA::ID => {
32927                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
32928            }
32929            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
32930                MISSION_SET_CURRENT_DATA::default(),
32931            )),
32932            LOG_REQUEST_LIST_DATA::ID => {
32933                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
32934            }
32935            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
32936            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
32937                SAFETY_SET_ALLOWED_AREA_DATA::default(),
32938            )),
32939            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
32940            ATTITUDE_TARGET_DATA::ID => {
32941                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
32942            }
32943            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
32944            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
32945            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
32946            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
32947                SAFETY_ALLOWED_AREA_DATA::default(),
32948            )),
32949            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
32950            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
32951            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
32952                LOCAL_POSITION_NED_COV_DATA::default(),
32953            )),
32954            LOG_REQUEST_DATA_DATA::ID => {
32955                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
32956            }
32957            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
32958                COMPONENT_INFORMATION_DATA::default(),
32959            )),
32960            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
32961                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
32962            )),
32963            ESTIMATOR_STATUS_DATA::ID => {
32964                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
32965            }
32966            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
32967                RC_CHANNELS_OVERRIDE_DATA::default(),
32968            )),
32969            CAMERA_SETTINGS_DATA::ID => {
32970                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
32971            }
32972            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
32973            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
32974                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
32975            )),
32976            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
32977            OBSTACLE_DISTANCE_DATA::ID => {
32978                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
32979            }
32980            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
32981            UAVCAN_NODE_STATUS_DATA::ID => {
32982                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
32983            }
32984            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
32985                ORBIT_EXECUTION_STATUS_DATA::default(),
32986            )),
32987            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
32988                OPEN_DRONE_ID_SYSTEM_DATA::default(),
32989            )),
32990            GPS_GLOBAL_ORIGIN_DATA::ID => {
32991                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
32992            }
32993            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
32994                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
32995            )),
32996            HIL_OPTICAL_FLOW_DATA::ID => {
32997                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
32998            }
32999            PARAM_REQUEST_LIST_DATA::ID => {
33000                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
33001            }
33002            ISBD_LINK_STATUS_DATA::ID => {
33003                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
33004            }
33005            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
33006            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
33007            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33008                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
33009            )),
33010            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
33011            MESSAGE_INTERVAL_DATA::ID => {
33012                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
33013            }
33014            SERVO_OUTPUT_RAW_DATA::ID => {
33015                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
33016            }
33017            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
33018            LOG_REQUEST_END_DATA::ID => {
33019                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
33020            }
33021            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
33022            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33023                PARAM_EXT_REQUEST_READ_DATA::default(),
33024            )),
33025            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
33026            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33027                CONTROL_SYSTEM_STATE_DATA::default(),
33028            )),
33029            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
33030                TIME_ESTIMATE_TO_TARGET_DATA::default(),
33031            )),
33032            PROTOCOL_VERSION_DATA::ID => {
33033                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
33034            }
33035            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
33036            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
33037            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
33038            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
33039            RESOURCE_REQUEST_DATA::ID => {
33040                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
33041            }
33042            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33043                CAMERA_THERMAL_RANGE_DATA::default(),
33044            )),
33045            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33046                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
33047            )),
33048            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
33049            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33050                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
33051            )),
33052            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33053                GLOBAL_POSITION_INT_DATA::default(),
33054            )),
33055            MANUAL_SETPOINT_DATA::ID => {
33056                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
33057            }
33058            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
33059            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33060                GLOBAL_POSITION_INT_COV_DATA::default(),
33061            )),
33062            PARAM_REQUEST_READ_DATA::ID => {
33063                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
33064            }
33065            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
33066            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
33067            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
33068            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
33069            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
33070            MISSION_CLEAR_ALL_DATA::ID => {
33071                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
33072            }
33073            GENERATOR_STATUS_DATA::ID => {
33074                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
33075            }
33076            _ => None,
33077        }
33078    }
33079    #[cfg(feature = "arbitrary")]
33080    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
33081        match id {
33082            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33083                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
33084            )),
33085            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
33086            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
33087            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
33088            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33089                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
33090                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
33091                ))
33092            }
33093            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
33094            CELLULAR_CONFIG_DATA::ID => {
33095                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
33096            }
33097            CAMERA_FOV_STATUS_DATA::ID => {
33098                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
33099            }
33100            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
33101            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
33102            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
33103            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
33104            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33105                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33106            )),
33107            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33108                AVAILABLE_MODES_MONITOR_DATA::random(rng),
33109            )),
33110            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
33111            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
33112            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33113                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
33114            )),
33115            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
33116            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33117                MISSION_REQUEST_LIST_DATA::random(rng),
33118            )),
33119            NAMED_VALUE_FLOAT_DATA::ID => {
33120                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
33121            }
33122            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
33123                VISION_POSITION_ESTIMATE_DATA::random(rng),
33124            )),
33125            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
33126            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
33127                VIDEO_STREAM_STATUS_DATA::random(rng),
33128            )),
33129            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
33130            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
33131            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33132                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
33133            )),
33134            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
33135                SET_ATTITUDE_TARGET_DATA::random(rng),
33136            )),
33137            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
33138            MISSION_REQUEST_DATA::ID => {
33139                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
33140            }
33141            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
33142            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
33143            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33144                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
33145            )),
33146            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
33147            PARAM_EXT_VALUE_DATA::ID => {
33148                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
33149            }
33150            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33151                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
33152            )),
33153            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
33154            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33155                MISSION_ITEM_REACHED_DATA::random(rng),
33156            )),
33157            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
33158            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
33159            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33160                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
33161            )),
33162            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33163                RESPONSE_EVENT_ERROR_DATA::random(rng),
33164            )),
33165            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
33166            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
33167                ILLUMINATOR_STATUS_DATA::random(rng),
33168            )),
33169            GPS_INJECT_DATA_DATA::ID => {
33170                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
33171            }
33172            NAMED_VALUE_INT_DATA::ID => {
33173                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
33174            }
33175            HYGROMETER_SENSOR_DATA::ID => {
33176                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
33177            }
33178            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
33179            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
33180            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
33181            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
33182            HIL_RC_INPUTS_RAW_DATA::ID => {
33183                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
33184            }
33185            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
33186                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33187            )),
33188            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33189                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
33190            )),
33191            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33192                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33193                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
33194                ))
33195            }
33196            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
33197            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
33198                VIDEO_STREAM_INFORMATION_DATA::random(rng),
33199            )),
33200            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33201                MISSION_REQUEST_INT_DATA::random(rng),
33202            )),
33203            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33204                ATTITUDE_QUATERNION_COV_DATA::random(rng),
33205            )),
33206            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
33207            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33208                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
33209            )),
33210            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
33211                COMPONENT_METADATA_DATA::random(rng),
33212            )),
33213            MISSION_CURRENT_DATA::ID => {
33214                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
33215            }
33216            MOUNT_ORIENTATION_DATA::ID => {
33217                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
33218            }
33219            SCALED_PRESSURE2_DATA::ID => {
33220                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
33221            }
33222            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
33223                LOGGING_DATA_ACKED_DATA::random(rng),
33224            )),
33225            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
33226            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33227                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
33228            )),
33229            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
33230            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33231                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33232                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
33233                ))
33234            }
33235            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
33236            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
33237            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33238                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
33239            )),
33240            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
33241            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
33242            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
33243            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
33244            UAVCAN_NODE_INFO_DATA::ID => {
33245                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
33246            }
33247            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33248                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
33249            )),
33250            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
33251                EXTENDED_SYS_STATE_DATA::random(rng),
33252            )),
33253            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
33254            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
33255            SCALED_PRESSURE3_DATA::ID => {
33256                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
33257            }
33258            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
33259                SMART_BATTERY_INFO_DATA::random(rng),
33260            )),
33261            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33262                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
33263            )),
33264            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
33265            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
33266                RC_CHANNELS_SCALED_DATA::random(rng),
33267            )),
33268            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
33269                CAMERA_INFORMATION_DATA::random(rng),
33270            )),
33271            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
33272                UTM_GLOBAL_POSITION_DATA::random(rng),
33273            )),
33274            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33275                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33276                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
33277                ))
33278            }
33279            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
33280            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33281                CAMERA_CAPTURE_STATUS_DATA::random(rng),
33282            )),
33283            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
33284            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33285                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
33286            )),
33287            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
33288            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
33289                LOCAL_POSITION_NED_DATA::random(rng),
33290            )),
33291            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
33292                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
33293            )),
33294            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33295                REQUEST_DATA_STREAM_DATA::random(rng),
33296            )),
33297            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
33298            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
33299            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
33300            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
33301            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33302                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
33303            )),
33304            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
33305                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
33306            )),
33307            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
33308                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
33309            )),
33310            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33311                HIL_STATE_QUATERNION_DATA::random(rng),
33312            )),
33313            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
33314            SUPPORTED_TUNES_DATA::ID => {
33315                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
33316            }
33317            ENCAPSULATED_DATA_DATA::ID => {
33318                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
33319            }
33320            DISTANCE_SENSOR_DATA::ID => {
33321                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
33322            }
33323            AUTOPILOT_VERSION_DATA::ID => {
33324                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
33325            }
33326            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
33327            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
33328            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
33329                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
33330            )),
33331            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
33332            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33333                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
33334            )),
33335            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33336                GIMBAL_MANAGER_STATUS_DATA::random(rng),
33337            )),
33338            RC_CHANNELS_RAW_DATA::ID => {
33339                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
33340            }
33341            AVAILABLE_MODES_DATA::ID => {
33342                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
33343            }
33344            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
33345            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33346                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
33347            )),
33348            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
33349                VISION_SPEED_ESTIMATE_DATA::random(rng),
33350            )),
33351            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
33352            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
33353                VICON_POSITION_ESTIMATE_DATA::random(rng),
33354            )),
33355            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33356                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
33357            )),
33358            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33359                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
33360            )),
33361            CAN_FILTER_MODIFY_DATA::ID => {
33362                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
33363            }
33364            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
33365            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
33366            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
33367            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
33368                FLIGHT_INFORMATION_DATA::random(rng),
33369            )),
33370            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33371                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
33372            )),
33373            MISSION_ITEM_INT_DATA::ID => {
33374                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
33375            }
33376            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33377                ATTITUDE_QUATERNION_DATA::random(rng),
33378            )),
33379            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33380                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
33381            )),
33382            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
33383            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33384                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
33385            )),
33386            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
33387            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
33388            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33389                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
33390                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
33391                ))
33392            }
33393            SCALED_PRESSURE_DATA::ID => {
33394                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
33395            }
33396            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
33397            DEBUG_FLOAT_ARRAY_DATA::ID => {
33398                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
33399            }
33400            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
33401            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
33402            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33403                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
33404            )),
33405            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33406                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
33407            )),
33408            SET_HOME_POSITION_DATA::ID => {
33409                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
33410            }
33411            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
33412            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33413                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
33414            )),
33415            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
33416            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
33417            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
33418            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
33419            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
33420            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33421                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
33422            )),
33423            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33424                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33425                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
33426                ))
33427            }
33428            LINK_NODE_STATUS_DATA::ID => {
33429                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
33430            }
33431            OPTICAL_FLOW_RAD_DATA::ID => {
33432                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
33433            }
33434            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
33435            CELLULAR_STATUS_DATA::ID => {
33436                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
33437            }
33438            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
33439                STORAGE_INFORMATION_DATA::random(rng),
33440            )),
33441            TERRAIN_REQUEST_DATA::ID => {
33442                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
33443            }
33444            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33445                MISSION_SET_CURRENT_DATA::random(rng),
33446            )),
33447            LOG_REQUEST_LIST_DATA::ID => {
33448                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
33449            }
33450            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
33451            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33452                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
33453            )),
33454            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
33455            ATTITUDE_TARGET_DATA::ID => {
33456                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
33457            }
33458            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
33459            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
33460            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
33461            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
33462                SAFETY_ALLOWED_AREA_DATA::random(rng),
33463            )),
33464            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
33465            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
33466            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33467                LOCAL_POSITION_NED_COV_DATA::random(rng),
33468            )),
33469            LOG_REQUEST_DATA_DATA::ID => {
33470                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
33471            }
33472            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33473                COMPONENT_INFORMATION_DATA::random(rng),
33474            )),
33475            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33476                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
33477            )),
33478            ESTIMATOR_STATUS_DATA::ID => {
33479                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
33480            }
33481            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33482                RC_CHANNELS_OVERRIDE_DATA::random(rng),
33483            )),
33484            CAMERA_SETTINGS_DATA::ID => {
33485                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
33486            }
33487            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
33488            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33489                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
33490            )),
33491            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
33492            OBSTACLE_DISTANCE_DATA::ID => {
33493                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
33494            }
33495            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
33496            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
33497                UAVCAN_NODE_STATUS_DATA::random(rng),
33498            )),
33499            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33500                ORBIT_EXECUTION_STATUS_DATA::random(rng),
33501            )),
33502            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33503                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
33504            )),
33505            GPS_GLOBAL_ORIGIN_DATA::ID => {
33506                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
33507            }
33508            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33509                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
33510            )),
33511            HIL_OPTICAL_FLOW_DATA::ID => {
33512                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
33513            }
33514            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
33515                PARAM_REQUEST_LIST_DATA::random(rng),
33516            )),
33517            ISBD_LINK_STATUS_DATA::ID => {
33518                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
33519            }
33520            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
33521            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
33522            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33523                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
33524            )),
33525            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
33526            MESSAGE_INTERVAL_DATA::ID => {
33527                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
33528            }
33529            SERVO_OUTPUT_RAW_DATA::ID => {
33530                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
33531            }
33532            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
33533            LOG_REQUEST_END_DATA::ID => {
33534                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
33535            }
33536            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
33537            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33538                PARAM_EXT_REQUEST_READ_DATA::random(rng),
33539            )),
33540            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
33541            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33542                CONTROL_SYSTEM_STATE_DATA::random(rng),
33543            )),
33544            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
33545                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
33546            )),
33547            PROTOCOL_VERSION_DATA::ID => {
33548                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
33549            }
33550            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
33551            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
33552            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
33553            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
33554            RESOURCE_REQUEST_DATA::ID => {
33555                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
33556            }
33557            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33558                CAMERA_THERMAL_RANGE_DATA::random(rng),
33559            )),
33560            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33561                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
33562            )),
33563            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
33564            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33565                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
33566            )),
33567            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33568                GLOBAL_POSITION_INT_DATA::random(rng),
33569            )),
33570            MANUAL_SETPOINT_DATA::ID => {
33571                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
33572            }
33573            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
33574            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33575                GLOBAL_POSITION_INT_COV_DATA::random(rng),
33576            )),
33577            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
33578                PARAM_REQUEST_READ_DATA::random(rng),
33579            )),
33580            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
33581            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
33582            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
33583            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
33584            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
33585            MISSION_CLEAR_ALL_DATA::ID => {
33586                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
33587            }
33588            GENERATOR_STATUS_DATA::ID => {
33589                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
33590            }
33591            _ => None,
33592        }
33593    }
33594    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33595        match self {
33596            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
33597            Self::CANFD_FRAME(body) => body.ser(version, bytes),
33598            Self::MEMORY_VECT(body) => body.ser(version, bytes),
33599            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
33600            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
33601            Self::HIL_GPS(body) => body.ser(version, bytes),
33602            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
33603            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
33604            Self::HEARTBEAT(body) => body.ser(version, bytes),
33605            Self::COMMAND_INT(body) => body.ser(version, bytes),
33606            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
33607            Self::HOME_POSITION(body) => body.ser(version, bytes),
33608            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
33609            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
33610            Self::STATUSTEXT(body) => body.ser(version, bytes),
33611            Self::ATTITUDE(body) => body.ser(version, bytes),
33612            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
33613            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
33614            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
33615            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
33616            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
33617            Self::SIM_STATE(body) => body.ser(version, bytes),
33618            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
33619            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
33620            Self::ESC_STATUS(body) => body.ser(version, bytes),
33621            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
33622            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
33623            Self::RC_CHANNELS(body) => body.ser(version, bytes),
33624            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
33625            Self::GPS2_RAW(body) => body.ser(version, bytes),
33626            Self::GPS2_RTK(body) => body.ser(version, bytes),
33627            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
33628            Self::LOGGING_ACK(body) => body.ser(version, bytes),
33629            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
33630            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
33631            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
33632            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
33633            Self::CAN_FRAME(body) => body.ser(version, bytes),
33634            Self::V2_EXTENSION(body) => body.ser(version, bytes),
33635            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
33636            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
33637            Self::LOG_ERASE(body) => body.ser(version, bytes),
33638            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
33639            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
33640            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
33641            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
33642            Self::VFR_HUD(body) => body.ser(version, bytes),
33643            Self::PARAM_VALUE(body) => body.ser(version, bytes),
33644            Self::GPS_RTK(body) => body.ser(version, bytes),
33645            Self::COMMAND_ACK(body) => body.ser(version, bytes),
33646            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
33647            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
33648            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
33649            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
33650            Self::GPS_STATUS(body) => body.ser(version, bytes),
33651            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
33652            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
33653            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
33654            Self::DEBUG_VECT(body) => body.ser(version, bytes),
33655            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
33656            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
33657            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
33658            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
33659            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
33660            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
33661            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
33662            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
33663            Self::SET_MODE(body) => body.ser(version, bytes),
33664            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
33665            Self::MISSION_COUNT(body) => body.ser(version, bytes),
33666            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
33667            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
33668            Self::ALTITUDE(body) => body.ser(version, bytes),
33669            Self::EVENT(body) => body.ser(version, bytes),
33670            Self::DATA_STREAM(body) => body.ser(version, bytes),
33671            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
33672            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
33673            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
33674            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
33675            Self::RADIO_STATUS(body) => body.ser(version, bytes),
33676            Self::SCALED_IMU2(body) => body.ser(version, bytes),
33677            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
33678            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
33679            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
33680            Self::POWER_STATUS(body) => body.ser(version, bytes),
33681            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
33682            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
33683            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
33684            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
33685            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
33686            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
33687            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
33688            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
33689            Self::PLAY_TUNE(body) => body.ser(version, bytes),
33690            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
33691            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
33692            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
33693            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
33694            Self::RAW_RPM(body) => body.ser(version, bytes),
33695            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
33696            Self::RAW_IMU(body) => body.ser(version, bytes),
33697            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
33698            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
33699            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
33700            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
33701            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
33702            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
33703            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
33704            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
33705            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
33706            Self::MISSION_ITEM(body) => body.ser(version, bytes),
33707            Self::CURRENT_MODE(body) => body.ser(version, bytes),
33708            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
33709            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
33710            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
33711            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
33712            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
33713            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
33714            Self::LANDING_TARGET(body) => body.ser(version, bytes),
33715            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
33716            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
33717            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
33718            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
33719            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
33720            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
33721            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
33722            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
33723            Self::PING(body) => body.ser(version, bytes),
33724            Self::WINCH_STATUS(body) => body.ser(version, bytes),
33725            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
33726            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
33727            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
33728            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
33729            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
33730            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
33731            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
33732            Self::HIL_STATE(body) => body.ser(version, bytes),
33733            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
33734            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
33735            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
33736            Self::DEBUG(body) => body.ser(version, bytes),
33737            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
33738            Self::AIS_VESSEL(body) => body.ser(version, bytes),
33739            Self::ODOMETRY(body) => body.ser(version, bytes),
33740            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
33741            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
33742            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
33743            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
33744            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
33745            Self::COMMAND_LONG(body) => body.ser(version, bytes),
33746            Self::GPS_INPUT(body) => body.ser(version, bytes),
33747            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
33748            Self::LOGGING_DATA(body) => body.ser(version, bytes),
33749            Self::COLLISION(body) => body.ser(version, bytes),
33750            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
33751            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
33752            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
33753            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
33754            Self::LOG_ENTRY(body) => body.ser(version, bytes),
33755            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
33756            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
33757            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
33758            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
33759            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
33760            Self::ESC_INFO(body) => body.ser(version, bytes),
33761            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
33762            Self::WIND_COV(body) => body.ser(version, bytes),
33763            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
33764            Self::TIMESYNC(body) => body.ser(version, bytes),
33765            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
33766            Self::LOG_DATA(body) => body.ser(version, bytes),
33767            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
33768            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
33769            Self::AUTH_KEY(body) => body.ser(version, bytes),
33770            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
33771            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
33772            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
33773            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
33774            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
33775            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
33776            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
33777            Self::TUNNEL(body) => body.ser(version, bytes),
33778            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
33779            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
33780            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
33781            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
33782            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
33783            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
33784            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
33785            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
33786            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
33787            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
33788            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
33789            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
33790            Self::PARAM_SET(body) => body.ser(version, bytes),
33791            Self::SCALED_IMU(body) => body.ser(version, bytes),
33792            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
33793            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
33794            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
33795            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
33796            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
33797            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
33798            Self::EFI_STATUS(body) => body.ser(version, bytes),
33799            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
33800            Self::VIBRATION(body) => body.ser(version, bytes),
33801            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
33802            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
33803            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
33804            Self::SYS_STATUS(body) => body.ser(version, bytes),
33805            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
33806            Self::FUEL_STATUS(body) => body.ser(version, bytes),
33807            Self::MISSION_ACK(body) => body.ser(version, bytes),
33808            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
33809            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
33810            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
33811            Self::FENCE_STATUS(body) => body.ser(version, bytes),
33812            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
33813            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
33814            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
33815            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
33816            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
33817            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
33818            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
33819            Self::SCALED_IMU3(body) => body.ser(version, bytes),
33820            Self::HIL_SENSOR(body) => body.ser(version, bytes),
33821            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
33822            Self::BATTERY_INFO(body) => body.ser(version, bytes),
33823            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
33824            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
33825        }
33826    }
33827    fn extra_crc(id: u32) -> u8 {
33828        match id {
33829            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
33830            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
33831            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
33832            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
33833            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33834                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
33835            }
33836            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
33837            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
33838            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
33839            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
33840            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
33841            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
33842            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
33843            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
33844            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
33845            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
33846            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
33847            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
33848            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
33849            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
33850            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
33851            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
33852            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
33853            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
33854            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
33855            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
33856            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
33857            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
33858            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
33859            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
33860            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
33861            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
33862            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
33863            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
33864            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
33865            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
33866            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
33867            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
33868            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
33869            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
33870            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
33871            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
33872            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
33873            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
33874            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
33875            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
33876            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
33877            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
33878            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
33879            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
33880            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
33881            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
33882            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
33883            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
33884            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33885                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
33886            }
33887            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
33888            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
33889            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
33890            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
33891            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
33892            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
33893            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
33894            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
33895            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
33896            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
33897            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
33898            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
33899            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
33900            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
33901            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33902                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
33903            }
33904            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
33905            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
33906            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
33907            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
33908            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
33909            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
33910            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
33911            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
33912            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
33913            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
33914            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
33915            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
33916            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
33917            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
33918            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
33919            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
33920            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
33921            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
33922            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
33923            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33924                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
33925            }
33926            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
33927            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
33928            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
33929            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
33930            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
33931            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
33932            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
33933            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
33934            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
33935            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
33936            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
33937            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
33938            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
33939            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33940                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
33941            }
33942            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
33943            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
33944            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
33945            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
33946            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
33947            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
33948            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
33949            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
33950            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
33951            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
33952            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
33953            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
33954            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
33955            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
33956            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
33957            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
33958            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
33959            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
33960            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
33961            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
33962            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
33963            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
33964            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
33965            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
33966            PING_DATA::ID => PING_DATA::EXTRA_CRC,
33967            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
33968            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
33969            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
33970            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
33971            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
33972            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
33973            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
33974            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
33975            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
33976            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
33977            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33978                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
33979            }
33980            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
33981            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
33982            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
33983            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
33984            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
33985            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
33986            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
33987            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
33988            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
33989            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
33990            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
33991            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
33992            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
33993            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
33994            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
33995            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
33996            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33997                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
33998            }
33999            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
34000            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
34001            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
34002            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
34003            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
34004            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
34005            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
34006            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
34007            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
34008            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
34009            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
34010            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
34011            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
34012            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
34013            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
34014            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
34015            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
34016            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
34017            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
34018            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
34019            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
34020            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
34021            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
34022            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
34023            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
34024            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
34025            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
34026            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
34027            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
34028            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
34029            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
34030            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
34031            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
34032            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34033            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
34034            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
34035            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
34036            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
34037            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
34038            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
34039            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
34040            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
34041            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
34042            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
34043            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
34044            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
34045            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
34046            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
34047            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
34048            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
34049            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
34050            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
34051            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
34052            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
34053            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
34054            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
34055            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
34056            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
34057            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
34058            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
34059            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
34060            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
34061            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
34062            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
34063            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
34064            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
34065            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
34066            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
34067            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
34068            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
34069            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
34070            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
34071            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
34072            _ => 0,
34073        }
34074    }
34075    fn target_system_id(&self) -> Option<u8> {
34076        match self {
34077            Self::CANFD_FRAME(inner) => Some(inner.target_system),
34078            Self::COMMAND_INT(inner) => Some(inner.target_system),
34079            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
34080            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
34081            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
34082            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
34083            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
34084            Self::LOGGING_ACK(inner) => Some(inner.target_system),
34085            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
34086            Self::CAN_FRAME(inner) => Some(inner.target_system),
34087            Self::V2_EXTENSION(inner) => Some(inner.target_system),
34088            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
34089            Self::LOG_ERASE(inner) => Some(inner.target_system),
34090            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
34091            Self::COMMAND_ACK(inner) => Some(inner.target_system),
34092            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
34093            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
34094            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
34095            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
34096            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
34097            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
34098            Self::SET_MODE(inner) => Some(inner.target_system),
34099            Self::MISSION_COUNT(inner) => Some(inner.target_system),
34100            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
34101            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
34102            Self::PLAY_TUNE(inner) => Some(inner.target_system),
34103            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
34104            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
34105            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
34106            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
34107            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
34108            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
34109            Self::MISSION_ITEM(inner) => Some(inner.target_system),
34110            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
34111            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
34112            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
34113            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
34114            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
34115            Self::PING(inner) => Some(inner.target_system),
34116            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
34117            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
34118            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
34119            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
34120            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
34121            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
34122            Self::COMMAND_LONG(inner) => Some(inner.target_system),
34123            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
34124            Self::LOGGING_DATA(inner) => Some(inner.target_system),
34125            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
34126            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
34127            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
34128            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
34129            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
34130            Self::TIMESYNC(inner) => Some(inner.target_system),
34131            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
34132            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
34133            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
34134            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
34135            Self::TUNNEL(inner) => Some(inner.target_system),
34136            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
34137            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
34138            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
34139            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
34140            Self::PARAM_SET(inner) => Some(inner.target_system),
34141            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
34142            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
34143            Self::MISSION_ACK(inner) => Some(inner.target_system),
34144            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
34145            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
34146            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
34147            _ => None,
34148        }
34149    }
34150    fn target_component_id(&self) -> Option<u8> {
34151        match self {
34152            Self::CANFD_FRAME(inner) => Some(inner.target_component),
34153            Self::COMMAND_INT(inner) => Some(inner.target_component),
34154            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
34155            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
34156            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
34157            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
34158            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
34159            Self::LOGGING_ACK(inner) => Some(inner.target_component),
34160            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
34161            Self::CAN_FRAME(inner) => Some(inner.target_component),
34162            Self::V2_EXTENSION(inner) => Some(inner.target_component),
34163            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
34164            Self::LOG_ERASE(inner) => Some(inner.target_component),
34165            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
34166            Self::COMMAND_ACK(inner) => Some(inner.target_component),
34167            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
34168            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
34169            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
34170            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
34171            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
34172            Self::MISSION_COUNT(inner) => Some(inner.target_component),
34173            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
34174            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
34175            Self::PLAY_TUNE(inner) => Some(inner.target_component),
34176            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
34177            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
34178            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
34179            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
34180            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
34181            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
34182            Self::MISSION_ITEM(inner) => Some(inner.target_component),
34183            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
34184            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
34185            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
34186            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
34187            Self::PING(inner) => Some(inner.target_component),
34188            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
34189            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
34190            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
34191            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
34192            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
34193            Self::COMMAND_LONG(inner) => Some(inner.target_component),
34194            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
34195            Self::LOGGING_DATA(inner) => Some(inner.target_component),
34196            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
34197            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
34198            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
34199            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
34200            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
34201            Self::TIMESYNC(inner) => Some(inner.target_component),
34202            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
34203            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
34204            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
34205            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
34206            Self::TUNNEL(inner) => Some(inner.target_component),
34207            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
34208            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
34209            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
34210            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
34211            Self::PARAM_SET(inner) => Some(inner.target_component),
34212            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
34213            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
34214            Self::MISSION_ACK(inner) => Some(inner.target_component),
34215            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
34216            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
34217            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
34218            _ => None,
34219        }
34220    }
34221}